Fixed VS2013 warning.

This commit is contained in:
Branimir Karadzic 2014-10-10 09:26:58 -07:00
parent 4edb8bc376
commit a96837c1ea

View file

@ -748,8 +748,9 @@ namespace bgfx
uint32_t reserve(uint16_t* _num)
{
BX_CHECK(m_num+_num < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache overflow. %d (max: %d)", m_num+_num, BGFX_CONFIG_MAX_MATRIX_CACHE);
uint32_t num = bx::uint32_min(BGFX_CONFIG_MAX_MATRIX_CACHE-m_num, *_num);
uint32_t num = *_num;
BX_CHECK(m_num+num < BGFX_CONFIG_MAX_MATRIX_CACHE, "Matrix cache overflow. %d (max: %d)", m_num+num, BGFX_CONFIG_MAX_MATRIX_CACHE);
num = bx::uint32_min(num, BGFX_CONFIG_MAX_MATRIX_CACHE-m_num);
uint32_t first = m_num;
m_num += num;
*_num = (uint16_t)num;