aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/inputmanager.cpp')
-rw-r--r--src/inputmanager.cpp24
1 files changed, 7 insertions, 17 deletions
diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp
index c9c80d93..2583201a 100644
--- a/src/inputmanager.cpp
+++ b/src/inputmanager.cpp
@@ -8,25 +8,15 @@
#include "inputmanager.hpp"
-namespace yage
-{
+namespace yage {
-void InputManager::keyPressed(unsigned key)
-{
- key_map_[key]=true;
-}
+void InputManager::keyPressed(unsigned key) { key_map_[key] = true; }
-void InputManager::keyReleased(unsigned key)
-{
- key_map_[key]=false;
-}
+void InputManager::keyReleased(unsigned key) { key_map_[key] = false; }
-bool InputManager::isKeyPressed(unsigned key) const
-{
- auto key_index=key_map_.find(key);
- if(key_index!=key_map_.end())
- return key_index->second;
- return false;
+bool InputManager::isKeyPressed(unsigned key) const {
+ auto key_index = key_map_.find(key);
+ if (key_index != key_map_.end()) return key_index->second;
+ return false;
}
-
}