From 545978d661698b881c1cccbc3b429d1ab4e97dc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Wed, 12 Nov 2014 22:16:19 -0800 Subject: [PATCH] Cleanup. --- examples/common/entry/input.cpp | 6 +++++- src/bgfx_p.h | 7 ++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/examples/common/entry/input.cpp b/examples/common/entry/input.cpp index 49f1eb51..543100be 100644 --- a/examples/common/entry/input.cpp +++ b/examples/common/entry/input.cpp @@ -157,7 +157,11 @@ struct Input void removeBindings(const char* _name) { - m_inputBindingsMap.erase(m_inputBindingsMap.find(_name)); + InputBindingMap::iterator it = m_inputBindingsMap.find(_name); + if (it != m_inputBindingsMap.end() ) + { + m_inputBindingsMap.erase(it); + } } void process(const InputBinding* _bindings) diff --git a/src/bgfx_p.h b/src/bgfx_p.h index da52055b..9de97a3d 100644 --- a/src/bgfx_p.h +++ b/src/bgfx_p.h @@ -2223,7 +2223,12 @@ namespace bgfx && BGFX_CHUNK_MAGIC_FSH != magic && BGFX_CHUNK_MAGIC_VSH != magic) { - BX_WARN(false, "Invalid shader signature! 0x%08x.", magic); + BX_WARN(false, "Invalid shader signature! %c%c%c%d." + , ( (uint8_t*)&magic)[0] + , ( (uint8_t*)&magic)[1] + , ( (uint8_t*)&magic)[2] + , ( (uint8_t*)&magic)[3] + ); ShaderHandle invalid = BGFX_INVALID_HANDLE; return invalid; }