From 9232a98b72eee7af4f7f2153c1b2ccedbfa4cc65 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Tue, 17 Dec 2024 14:42:29 +0100 Subject: fix code standard --- src/crepe/facade/SDLContext.cpp | 5 ++--- src/crepe/facade/SDLContext.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 7ccc243..f331517 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -75,9 +75,8 @@ SDLContext::~SDLContext() { } Keycode SDLContext::sdl_to_keycode(SDL_Scancode sdl_key) { - if (!LOOKUP_TABLE.contains(sdl_key)) return Keycode::NONE; - - return LOOKUP_TABLE.at(sdl_key); + if (!lookup_table.contains(sdl_key)) return Keycode::NONE; + return lookup_table.at(sdl_key); } const keyboard_state_t & SDLContext::get_keyboard_state() { diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h index 8f4760e..b9c7fbd 100644 --- a/src/crepe/facade/SDLContext.h +++ b/src/crepe/facade/SDLContext.h @@ -245,7 +245,7 @@ private: //! variable to store the state of each key (true = pressed, false = not pressed) keyboard_state_t keyboard_state; //! lookup table for converting SDL_SCANCODES to Keycodes - const std::unordered_map LOOKUP_TABLE + const std::unordered_map lookup_table = {{SDL_SCANCODE_SPACE, Keycode::SPACE}, {SDL_SCANCODE_APOSTROPHE, Keycode::APOSTROPHE}, {SDL_SCANCODE_COMMA, Keycode::COMMA}, -- cgit v1.2.3