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()); } } }