From c34035b9491c201eca226a2e065fd9753d706433 Mon Sep 17 00:00:00 2001 From: crupest Date: Sun, 15 Oct 2023 00:07:24 +0800 Subject: Improve bitmask. Bool conversion -> explicit std::hash support --- include/cru/ui/helper/ShortcutHub.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'include/cru/ui/helper') 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 #include -#include #include -#include -#include -#include #include #include @@ -74,7 +70,7 @@ struct hash { std::size_t operator()(const cru::ui::helper::ShortcutKeyBind& value) const { std::size_t result = 0; cru::hash_combine(result, static_cast(value.GetKey())); - cru::hash_combine(result, static_cast(value.GetModifier())); + cru::hash_combine(result, value.GetModifier()); return result; } }; -- cgit v1.2.3