2
0
Эх сурвалжийг харах

windows compiler warnings

David Rose 23 жил өмнө
parent
commit
5255ae25ad

+ 3 - 3
panda/src/text/default_font.cxx

@@ -18,7 +18,7 @@
 
 #include "default_font.h"
 
-#if defined(HAVE_FREETYPE) && defined(COMPILE_IN_DEFAULT_FONT)
+#if defined(HAVE_FREETYPE) && defined(COMPILE_IN_DEFAULT_FONT) && !defined(CPPPARSER)
 
 // This file was generated from uhvr8ac.pfb, a PostScript Type1 font
 // installed along with TeX (and it was probably converted there from
@@ -28,7 +28,7 @@
 // This is used as a standard fallback font when no font file is
 // specified by the user.
 
-const char default_font_data[] = {
+const unsigned char default_font_data[] = {
   0x80, 0x01, 0x6e, 0x06, 0x00, 0x00, 0x25, 0x21, 0x50, 0x53, 0x2d, 
   0x41, 0x64, 0x6f, 0x62, 0x65, 0x46, 0x6f, 0x6e, 0x74, 0x2d, 0x31, 
   0x2e, 0x30, 0x3a, 0x20, 0x4e, 0x69, 0x6d, 0x62, 0x75, 0x73, 0x53, 
@@ -3362,4 +3362,4 @@ const char default_font_data[] = {
 
 const int default_font_size = sizeof(default_font_data);
 
-#endif  // HAVE_FREETYPE && COMPILE_IN_DEFAULT_FONT
+#endif  // HAVE_FREETYPE && COMPILE_IN_DEFAULT_FONT && !CPPPARSER

+ 3 - 3
panda/src/text/default_font.h

@@ -21,12 +21,12 @@
 
 #include "pandabase.h"
 
-#if defined(HAVE_FREETYPE) && defined(COMPILE_IN_DEFAULT_FONT)
+#if defined(HAVE_FREETYPE) && defined(COMPILE_IN_DEFAULT_FONT) && !defined(CPPPARSER)
 
-extern const char default_font_data[];
+extern const unsigned char default_font_data[];
 extern const int default_font_size;
 
-#endif  // HAVE_FREETYPE && COMPILE_IN_DEFAULT_FONT
+#endif  // HAVE_FREETYPE && COMPILE_IN_DEFAULT_FONT && !CPPPARSER
 
 #endif
 

+ 2 - 1
panda/src/text/textNode.cxx

@@ -1316,7 +1316,8 @@ load_default_font() {
 
   // Then, attempt to load the compiled-in font, if we have one.
 #if defined(HAVE_FREETYPE) && defined(COMPILE_IN_DEFAULT_FONT)
-  _default_font = new DynamicTextFont(default_font_data, default_font_size, 0);
+  _default_font = new DynamicTextFont((const char *)default_font_data, 
+                                      default_font_size, 0);
   if (_default_font->is_valid()) {
     return;
   }