diff --git a/src/bgfx_p.h b/src/bgfx_p.h index ec4327317..3c7d1cf00 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -92,13 +92,13 @@ namespace bgfx } \ BX_MACRO_BLOCK_END -#define _BGFX_ASSERT(_condition, _format, ...) \ - BX_MACRO_BLOCK_BEGIN \ - if (!BX_IGNORE_C4127(_condition) \ - && bx::assertFunction(bx::Location::current(), "ASSERT " #_condition " -> " _format, ##__VA_ARGS__) ) \ - { \ - bgfx::fatal(__FILE__, uint16_t(__LINE__), bgfx::Fatal::DebugCheck, _format, ##__VA_ARGS__); \ - } \ +#define _BGFX_ASSERT(_condition, _format, ...) \ + BX_MACRO_BLOCK_BEGIN \ + if (!BX_IGNORE_C4127(_condition) \ + && bx::assertFunction(bx::Location::current(), 0, "ASSERT " #_condition " -> " _format, ##__VA_ARGS__) ) \ + { \ + bgfx::fatal(__FILE__, uint16_t(__LINE__), bgfx::Fatal::DebugCheck, _format, ##__VA_ARGS__); \ + } \ BX_MACRO_BLOCK_END #define BGFX_FATAL(_condition, _err, _format, ...) \ diff --git a/src/renderer_gl.cpp b/src/renderer_gl.cpp index 5cbd81156..4c8a3aff1 100644 --- a/src/renderer_gl.cpp +++ b/src/renderer_gl.cpp @@ -5313,7 +5313,7 @@ namespace bgfx { namespace gl } UniformType::Enum type = convertGlType(gltype); - m_constantBuffer->writeUniformHandle(type, 0, info->m_handle, uint16_t(num) ); + m_constantBuffer->writeUniformHandle(bx::narrowCast(type), 0, info->m_handle, uint16_t(num) ); m_constantBuffer->write(loc); BX_TRACE("store %s %d", name, info->m_handle); }