diff options
author | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-23 20:33:34 +0100 |
---|---|---|
committer | Yann Herklotz <ymherklotz@gmail.com> | 2017-08-23 20:33:34 +0100 |
commit | 56b5466f014d9f7c3662544713bd53670cd8e32f (patch) | |
tree | 479658b1424c53d3e1ceaadb16b095bb34531520 /src/body.cpp | |
parent | 34f910351863163438c419dd07045f1442321293 (diff) | |
download | YAGE-56b5466f014d9f7c3662544713bd53670cd8e32f.tar.gz YAGE-56b5466f014d9f7c3662544713bd53670cd8e32f.zip |
Applied modernize rules and fixed build.
Applied clang-tidy modernize rules and fixed the CMakeLists.txt
file so that it also linked against the SDL2 library.
Diffstat (limited to 'src/body.cpp')
-rw-r--r-- | src/body.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/body.cpp b/src/body.cpp index a17f6ee3..9c8babf1 100644 --- a/src/body.cpp +++ b/src/body.cpp @@ -6,6 +6,8 @@ * ---------------------------------------------------------------------------- */ +#include <utility> + #include "Physics/body.hpp" namespace yage { @@ -16,11 +18,11 @@ double Body::xPosition() const { return position_[0]; } double Body::yPosition() const { return position_[1]; } -Body::Body(const Vector2d& position, double mass, const Vector2d& velocity, +Body::Body(Vector2d position, double mass, Vector2d velocity, bool gravity) - : position_(position), + : position_(std::move(position)), mass_(mass), - velocity_(velocity), + velocity_(std::move(velocity)), gravity_(gravity) {} } // yage |