diff --git a/src/hotkey/hotkey_command.hpp b/src/hotkey/hotkey_command.hpp index 185c572a1104..8a03e78d56af 100644 --- a/src/hotkey/hotkey_command.hpp +++ b/src/hotkey/hotkey_command.hpp @@ -211,8 +211,6 @@ typedef std::bitset hk_scopes; /// this is currently a semi struct: it haves a constructor, but only const-public members. struct hotkey_command { public: - /// the compiler want me to make a default constructor - /// since most member are const, calling the default constructor is normally no use. hotkey_command() = delete; hotkey_command(HOTKEY_COMMAND cmd, const std::string& id, const t_string& desc, bool hidden, bool toggle, hk_scopes scope, HOTKEY_CATEGORY category, const t_string& tooltip); /// the names are strange: the "hotkey::HOTKEY_COMMAND" is named id, and the string to identify the object is called "command" diff --git a/src/hotkey/hotkey_item.cpp b/src/hotkey/hotkey_item.cpp index 3a9d29f96c85..2b1aaca2fe9a 100644 --- a/src/hotkey/hotkey_item.cpp +++ b/src/hotkey/hotkey_item.cpp @@ -295,7 +295,7 @@ bool hotkey_keyboard::matches_helper(const SDL_Event &event) const if ((event.type == SDL_KEYDOWN || event.type == SDL_KEYUP) && (mods & KMOD_CTRL || mods & KMOD_ALT || mods & KMOD_GUI || - CKey::is_uncomposable(event.key)) || command.toggle) { + command.toggle || CKey::is_uncomposable(event.key))) { return event.key.keysym.sym == keycode_ && mods == mod_; }