mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Compile fixes for Apple GCC 4.2
This commit is contained in:
parent
93ea52c23a
commit
88998f7cd8
2 changed files with 3 additions and 9 deletions
8
3rdparty/ib-compress/readbitstream.h
vendored
8
3rdparty/ib-compress/readbitstream.h
vendored
|
@ -95,16 +95,10 @@ inline ReadBitstream::ReadBitstream( const uint8_t* buffer, size_t bufferSize )
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(__GNUC__) || defined(_MSC_VER)
|
||||
#define U64(val) val##ULL
|
||||
#else
|
||||
#define U64(val) val
|
||||
#endif
|
||||
|
||||
RBS_INLINE uint32_t ReadBitstream::Read( uint32_t bitCount )
|
||||
{
|
||||
uint64_t mask = ( uint64_t( 1 ) << bitCount ) - 1;
|
||||
uint32_t result = static_cast< uint32_t >( ( m_bitBuffer >> ( 64 - m_bitsLeft ) & ( m_bitsLeft == 0 ? 0 : U64(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 )
|
||||
{
|
||||
|
|
|
@ -13,12 +13,12 @@
|
|||
|
||||
BX_PRAGMA_DIAGNOSTIC_PUSH();
|
||||
BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4245) // error C4245: '=' : conversion from 'int' to 'FT_UInt', signed/unsigned mismatch
|
||||
#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
|
||||
#if BX_COMPILER_MSVC || BX_COMPILER_GCC >= 40300
|
||||
#pragma push_macro("interface")
|
||||
#endif
|
||||
#undef interface
|
||||
#include <freetype/freetype.h>
|
||||
#if defined(_MSC_VER) || (defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ >= 3))
|
||||
#if BX_COMPILER_MSVC || BX_COMPILER_GCC >= 40300
|
||||
#pragma pop_macro("interface")
|
||||
#endif
|
||||
BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
|
Loading…
Reference in a new issue