Przeglądaj źródła

Merge pull request #261 from mmicko/master

Compile fixes for Apple GCC 4.2
Branimir Karadžić 11 lat temu
rodzic
commit
694ce002f0

+ 1 - 2
3rdparty/ib-compress/readbitstream.h

@@ -95,11 +95,10 @@ inline ReadBitstream::ReadBitstream( const uint8_t* buffer, size_t bufferSize )
     }
     }
 }
 }
 
 
-
 RBS_INLINE uint32_t ReadBitstream::Read( uint32_t bitCount )
 RBS_INLINE uint32_t ReadBitstream::Read( uint32_t bitCount )
 {
 {
     uint64_t mask   = ( uint64_t( 1 ) << bitCount ) - 1;
     uint64_t mask   = ( uint64_t( 1 ) << bitCount ) - 1;
-    uint32_t result = static_cast< uint32_t >( ( m_bitBuffer >> ( 64 - m_bitsLeft ) & ( m_bitsLeft == 0 ? 0 : 0xFFFFFFFFFFFFFFFF ) ) & mask );
+    uint32_t result = static_cast< uint32_t >( ( m_bitBuffer >> ( 64 - m_bitsLeft ) & ( m_bitsLeft == 0 ? 0 : UINT64_C(0xFFFFFFFFFFFFFFFF) ) ) & mask );
 
 
     if ( m_bitsLeft < bitCount )
     if ( m_bitsLeft < bitCount )
     {
     {

+ 4 - 0
examples/common/font/font_manager.cpp

@@ -13,10 +13,14 @@
 
 
 BX_PRAGMA_DIAGNOSTIC_PUSH();
 BX_PRAGMA_DIAGNOSTIC_PUSH();
 BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4245) // error C4245: '=' : conversion from 'int' to 'FT_UInt', signed/unsigned mismatch
 BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4245) // error C4245: '=' : conversion from 'int' to 'FT_UInt', signed/unsigned mismatch
+#if BX_COMPILER_MSVC || BX_COMPILER_GCC >= 40300
 #pragma push_macro("interface")
 #pragma push_macro("interface")
+#endif
 #undef interface
 #undef interface
 #include <freetype/freetype.h>
 #include <freetype/freetype.h>
+#if BX_COMPILER_MSVC || BX_COMPILER_GCC >= 40300
 #pragma pop_macro("interface")
 #pragma pop_macro("interface")
+#endif
 BX_PRAGMA_DIAGNOSTIC_POP();
 BX_PRAGMA_DIAGNOSTIC_POP();
 
 
 #include "../common.h"
 #include "../common.h"

+ 2 - 0
examples/common/nanovg/fontstash.h

@@ -428,6 +428,7 @@ struct FONScontext
 	void* errorUptr;
 	void* errorUptr;
 };
 };
 
 
+#if 0
 static void* fons__tmpalloc(size_t size, void* up)
 static void* fons__tmpalloc(size_t size, void* up)
 {
 {
 	unsigned char* ptr;
 	unsigned char* ptr;
@@ -453,6 +454,7 @@ static void fons__tmpfree(void* ptr, void* up)
 	// empty
 	// empty
 }
 }
 
 
+#endif
 // Copyright (c) 2008-2010 Bjoern Hoehrmann <[email protected]>
 // Copyright (c) 2008-2010 Bjoern Hoehrmann <[email protected]>
 // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
 // See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.