From d9dc2ea79fe66ae3c8d4b1aa567d3757485c5990 Mon Sep 17 00:00:00 2001 From: GeorgH93 Date: Wed, 18 Oct 2023 20:04:32 +0200 Subject: [PATCH] Slight improvements --- openVulkanoCpp/Input/InputAction.hpp | 6 +++--- openVulkanoCpp/Input/InputKey.hpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/openVulkanoCpp/Input/InputAction.hpp b/openVulkanoCpp/Input/InputAction.hpp index b4b1ab9..2e6038c 100644 --- a/openVulkanoCpp/Input/InputAction.hpp +++ b/openVulkanoCpp/Input/InputAction.hpp @@ -13,7 +13,7 @@ namespace OpenVulkano::Input { struct KeyBinding { - InputKey key; + const InputKey key; float scale; KeyBinding(InputKey keyBinding, float scaleFactor) @@ -23,8 +23,8 @@ namespace OpenVulkano::Input struct AxisButtonBinding { - InputKey positive; - InputKey negative; + const InputKey positive; + const InputKey negative; float scale; AxisButtonBinding(InputKey pos, InputKey neg, float scaleFactor) diff --git a/openVulkanoCpp/Input/InputKey.hpp b/openVulkanoCpp/Input/InputKey.hpp index d74df4c..7640e4a 100644 --- a/openVulkanoCpp/Input/InputKey.hpp +++ b/openVulkanoCpp/Input/InputKey.hpp @@ -310,12 +310,12 @@ namespace OpenVulkano::Input [[nodiscard]] int16_t GetInputKey() const { return key; } - bool operator==(const InputKey& other) + bool operator==(const InputKey& other) const { return deviceType == other.deviceType && type == other.type && key == other.key; } - bool operator!=(const InputKey& other) + bool operator!=(const InputKey& other) const { return !(*this == other); }