diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-24 01:09:12 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-24 01:09:12 +0100 |
commit | f96af48ad82f1ddfab1402ca5c6eafd82af2b217 (patch) | |
tree | 0eea4b97d600460f386cb82611ce40d3ccf1bc7d /src | |
parent | 5403490b941f7c031bf1aafdb91b1098f69edbf2 (diff) | |
download | YAGE-f96af48ad82f1ddfab1402ca5c6eafd82af2b217.tar.gz YAGE-f96af48ad82f1ddfab1402ca5c6eafd82af2b217.zip |
Adding rules to clang-format.
Diffstat (limited to 'src')
-rw-r--r-- | src/body.cpp | 10 | ||||
-rw-r--r-- | src/inputmanager.cpp | 10 | ||||
-rw-r--r-- | src/particlebody.cpp | 5 | ||||
-rw-r--r-- | src/spritebatch.cpp | 5 | ||||
-rw-r--r-- | src/window.cpp | 5 |
5 files changed, 28 insertions, 7 deletions
diff --git a/src/body.cpp b/src/body.cpp index 96d01c22..036059a3 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -15,9 +15,15 @@ namespace yage const double Body::GRAVITY = -9.81; -double Body::xPosition() const { return position_[0]; } +double Body::xPosition() const +{ + return position_[0]; +} -double Body::yPosition() const { return position_[1]; } +double Body::yPosition() const +{ + return position_[1]; +} Body::Body(Vector2d position, double mass, Vector2d velocity, bool gravity) : position_(std::move(position)), mass_(mass), diff --git a/src/inputmanager.cpp b/src/inputmanager.cpp index cbb9d2df..1595dba0 100644 --- a/src/inputmanager.cpp +++ b/src/inputmanager.cpp @@ -11,9 +11,15 @@ 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 { diff --git a/src/particlebody.cpp b/src/particlebody.cpp index 20682368..3eea4183 100644 --- a/src/particlebody.cpp +++ b/src/particlebody.cpp @@ -20,7 +20,10 @@ ParticleBody::ParticleBody(const Vector2d &position, double mass, { } -void ParticleBody::applyForce(const Vector2d &force) { force_ += force; } +void ParticleBody::applyForce(const Vector2d &force) +{ + force_ += force; +} void ParticleBody::update() { diff --git a/src/spritebatch.cpp b/src/spritebatch.cpp index efca0b8d..4d4f1b19 100644 --- a/src/spritebatch.cpp +++ b/src/spritebatch.cpp @@ -43,7 +43,10 @@ SpriteBatch::~SpriteBatch() } } -void SpriteBatch::init() { createVertexArray(); } +void SpriteBatch::init() +{ + createVertexArray(); +} void SpriteBatch::begin() { diff --git a/src/window.cpp b/src/window.cpp index 14671bf9..6eca459d 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -18,7 +18,10 @@ namespace yage Window::Window() = default; -Window::~Window() { SDL_DestroyWindow(window_); } +Window::~Window() +{ + SDL_DestroyWindow(window_); +} void Window::create(const std::string &window_name, int width, int height, unsigned flags) |