mirror of
https://github.com/Nimac0/SDL_Minigame
synced 2026-01-12 10:13:42 +00:00
fixed build errors
This commit is contained in:
parent
18c722d07d
commit
2ecd56fad9
@ -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()), ...);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user