diff options
author | crupest <crupest@outlook.com> | 2023-10-15 00:07:24 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-10-15 00:07:24 +0800 |
commit | c34035b9491c201eca226a2e065fd9753d706433 (patch) | |
tree | 5a4e422990621cafbb1dca72f03db32ace24c677 /include/cru/ui/helper | |
parent | 856df14d749014f11a583ade2fee988b076754cc (diff) | |
download | cru-c34035b9491c201eca226a2e065fd9753d706433.tar.gz cru-c34035b9491c201eca226a2e065fd9753d706433.tar.bz2 cru-c34035b9491c201eca226a2e065fd9753d706433.zip |
Improve bitmask.
Bool conversion -> explicit
std::hash support
Diffstat (limited to 'include/cru/ui/helper')
-rw-r--r-- | include/cru/ui/helper/ShortcutHub.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/cru/ui/helper/ShortcutHub.h b/include/cru/ui/helper/ShortcutHub.h index 28c41234..fe3b2a72 100644 --- a/include/cru/ui/helper/ShortcutHub.h +++ b/include/cru/ui/helper/ShortcutHub.h @@ -1,18 +1,14 @@ #pragma once #include "../Base.h" -#include "../events/UiEvents.h" +#include "../events/KeyEventArgs.h" #include "cru/common/Base.h" #include "cru/common/Event.h" #include "cru/platform/gui/Keyboard.h" #include <cstddef> #include <functional> -#include <memory> #include <optional> -#include <string> -#include <string_view> -#include <type_traits> #include <unordered_map> #include <vector> @@ -74,7 +70,7 @@ struct hash<cru::ui::helper::ShortcutKeyBind> { std::size_t operator()(const cru::ui::helper::ShortcutKeyBind& value) const { std::size_t result = 0; cru::hash_combine(result, static_cast<int>(value.GetKey())); - cru::hash_combine(result, static_cast<int>(value.GetModifier())); + cru::hash_combine(result, value.GetModifier()); return result; } }; |