0
0
mirror of https://github.com/Nimac0/SDL_Minigame synced 2026-01-12 13:43:41 +00:00

fixed build errors

This commit is contained in:
ezveee 2024-06-23 16:34:15 +02:00
parent 18c722d07d
commit 2ecd56fad9
2 changed files with 3 additions and 3 deletions

View File

@ -35,7 +35,7 @@ public:
// }
void unbindAction(const std::string& actionName, Key key);
void unbindAction(const std::string& actionName, std::vector<Key> key);
void unbindAction(const std::string& actionName, const std::vector<Key>& key);
// template<typename... Keys>
// 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()), ...);
// }
// }

View File

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