From bce1a52c42e59b056d7f07bb42214291a4aedfbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Sun, 12 Apr 2015 16:26:59 -0700 Subject: [PATCH] Cleanup. --- src/bgfx.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index dffe0bbf..7ea834a6 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -621,7 +621,7 @@ namespace bgfx } } - const char* s_uniformTypeName[UniformType::Count] = + const char* s_uniformTypeName[] = { "int", "float", @@ -634,9 +634,11 @@ namespace bgfx "mat3", "mat4", }; + BX_STATIC_ASSERT(UniformType::Count == BX_COUNTOF(s_uniformTypeName) ); const char* getUniformTypeName(UniformType::Enum _enum) { + BX_CHECK(_enum < UniformType::Count, "%d < UniformType::Count %d", _enum, UniformType::Count); return s_uniformTypeName[_enum]; }