aboutsummaryrefslogtreecommitdiffstats
path: root/src/inputmanager.cpp
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2017-08-06 17:03:05 +0100
committerYann Herklotz <ymherklotz@gmail.com>2017-08-06 17:03:05 +0100
commitab76770e75fe21c7a86133fdeb61162e24a79a18 (patch)
tree5a05620ed6a65cf999b4ea0f3976b803b44504c8 /src/inputmanager.cpp
parentcb0d6dc14873b4fe06dcfebe3818ef1e373237ae (diff)
downloadYAGE-ab76770e75fe21c7a86133fdeb61162e24a79a18.tar.gz
YAGE-ab76770e75fe21c7a86133fdeb61162e24a79a18.zip
Adding clang format with my style based on google
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;
}
-
}