This commit is contained in:
Бранимир Караџић
2024-12-07 22:49:45 -08:00
parent f6baa4bdaf
commit 042ebe8814
31 changed files with 110 additions and 110 deletions

View File

@@ -1505,7 +1505,7 @@ struct DebugDrawEncoderImpl
}
else
{
BX_STATIC_ASSERT(sizeof(DdVertex) == sizeof(bx::Vec3), "");
static_assert(sizeof(DdVertex) == sizeof(bx::Vec3), "");
uint64_t old = attrib.m_state;
attrib.m_state &= ~BGFX_STATE_CULL_MASK;
@@ -2241,7 +2241,7 @@ struct DebugDrawEncoderImpl
static const uint32_t kCacheSize = 1024;
static const uint32_t kStackSize = 16;
static const uint32_t kCacheQuadSize = 1024;
BX_STATIC_ASSERT(kCacheSize >= 3, "Cache must be at least 3 elements.");
static_assert(kCacheSize >= 3, "Cache must be at least 3 elements.");
DebugVertex m_cache[kCacheSize+1];
DebugUvVertex m_cacheQuad[kCacheQuadSize];
@@ -2281,7 +2281,7 @@ struct DebugDrawEncoderImpl
};
static DebugDrawEncoderImpl s_dde;
BX_STATIC_ASSERT(sizeof(DebugDrawEncoderImpl) <= sizeof(DebugDrawEncoder), "Size must match");
static_assert(sizeof(DebugDrawEncoderImpl) <= sizeof(DebugDrawEncoder), "Size must match");
void ddInit(bx::AllocatorI* _allocator)
{

View File

@@ -118,7 +118,7 @@ s_getFileNameA[] =
{ GetOpenFileNameA, /* OFN_EXPLORER */ 0x00080000 | /* OFN_DONTADDTORECENT */ 0x02000000 | /* OFN_FILEMUSTEXIST */ 0x00001000 },
{ GetSaveFileNameA, /* OFN_EXPLORER */ 0x00080000 | /* OFN_DONTADDTORECENT */ 0x02000000 },
};
BX_STATIC_ASSERT(BX_COUNTOF(s_getFileNameA) == FileSelectionDialogType::Count);
static_assert(BX_COUNTOF(s_getFileNameA) == FileSelectionDialogType::Count);
#endif
#if !BX_PLATFORM_OSX

View File

@@ -185,7 +185,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
"GamepadStart",
"GamepadGuide",
};
BX_STATIC_ASSERT(Key::Count == BX_COUNTOF(s_keyName) );
static_assert(Key::Count == BX_COUNTOF(s_keyName) );
const char* getName(Key::Enum _key)
{
@@ -455,7 +455,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
AppI::AppI(const char* _name, const char* _description, const char* _url)
{
BX_STATIC_ASSERT(sizeof(AppInternal) <= sizeof(m_internal) );
static_assert(sizeof(AppInternal) <= sizeof(m_internal) );
s_offset = BX_OFFSETOF(AppI, m_internal);
AppInternal* ai = (AppInternal*)m_internal;

View File

@@ -81,7 +81,7 @@ namespace entry
{ Key::GamepadUp, Key::GamepadDown },
{ Key::None, Key::None },
};
BX_STATIC_ASSERT(BX_COUNTOF(s_translateAxis) == BX_COUNTOF(s_axisDpad) );
static_assert(BX_COUNTOF(s_translateAxis) == BX_COUNTOF(s_axisDpad) );
struct Joystick
{