From 2ecd56fad92b5f7e0b882944799f23f0174a3eb0 Mon Sep 17 00:00:00 2001 From: ezveee Date: Sun, 23 Jun 2024 16:34:15 +0200 Subject: [PATCH] fixed build errors --- include/InputSystemComponent.h | 4 ++-- src/InputSystemComponent.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/InputSystemComponent.h b/include/InputSystemComponent.h index 5da21b5..ad28211 100644 --- a/include/InputSystemComponent.h +++ b/include/InputSystemComponent.h @@ -35,7 +35,7 @@ public: // } void unbindAction(const std::string& actionName, Key key); - void unbindAction(const std::string& actionName, std::vector key); + void unbindAction(const std::string& actionName, const std::vector& key); // template // void unbindAction(const std::string& actionName, Keys... keys) @@ -48,7 +48,7 @@ public: // auto& action = actionIt->second; // (action.keys.erase(std::remove(action.keys.begin(), action.keys.end(), keys), action.keys.end()), ...); // (m_keyToActionsMap[keys].erase(std::remove_if(m_keyToActionsMap[keys].begin(), m_keyToActionsMap[keys].end(), - // [&](const InputAction& a) { return a.actionName == actionName; }), m_keyToActionsMap[keys].end()), ...); + // [&](const InputAction& a) { return a.name == actionName; }), m_keyToActionsMap[keys].end()), ...); // } // } diff --git a/src/InputSystemComponent.cpp b/src/InputSystemComponent.cpp index 6a78202..e82735e 100644 --- a/src/InputSystemComponent.cpp +++ b/src/InputSystemComponent.cpp @@ -63,7 +63,7 @@ void InputSystemComponent::unbindAction(const std::string& actionName, const std auto& action = actionIt->second; action.keys.erase(std::remove(action.keys.begin(), action.keys.end(), key), action.keys.end()); m_keyToActionsMap[key].erase(std::remove_if(m_keyToActionsMap[key].begin(), m_keyToActionsMap[key].end(), - [&](const InputAction& a) { return a.actionName == actionName; }), m_keyToActionsMap[key].end()); + [&](const InputAction& a) { return a.name == actionName; }), m_keyToActionsMap[key].end()); } } }