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