From 38f7755fab48a4891b24f10a60467f8c842e0ee7 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Thu, 28 Jan 2021 01:05:52 +0100 Subject: [PATCH] Fix keycodes unordered_map indexing --- inferno/src/inferno/inputcodes.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/inferno/src/inferno/inputcodes.cpp b/inferno/src/inferno/inputcodes.cpp index 1999e8e..f599fcc 100644 --- a/inferno/src/inferno/inputcodes.cpp +++ b/inferno/src/inferno/inputcodes.cpp @@ -1,3 +1,4 @@ +#include // std::string #include // std::unordered_map #include @@ -7,7 +8,7 @@ namespace Inferno { - static std::unordered_map keys ({ + static std::unordered_map keys ({ { MAP_KEY(GLFW_KEY_UNKNOWN) }, { MAP_KEY(GLFW_KEY_SPACE) }, { MAP_KEY(GLFW_KEY_APOSTROPHE) }, @@ -135,7 +136,7 @@ namespace Inferno { int KeyCode(const char* name) { - ASSERT(keys.find(name) != keys.end(), "Could not find KeyCode"); + ASSERT(keys.find(name) != keys.end(), "keyCode could not find '{}'", name); return keys.at(name); }