diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-27 22:26:44 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2013-05-27 22:29:42 +0200 |
commit | b22d852b4c4aa89e0394397a703ecfa442b0a928 (patch) | |
tree | a1e29142aabf11393eb3e0604deb4b89a6124fe7 /src/math/point.h | |
parent | 12313fecf5a0ccad45f88575a24582b8363bd5a7 (diff) | |
download | colobot-b22d852b4c4aa89e0394397a703ecfa442b0a928.tar.gz colobot-b22d852b4c4aa89e0394397a703ecfa442b0a928.tar.bz2 colobot-b22d852b4c4aa89e0394397a703ecfa442b0a928.zip |
Fixed variable shadowing warnings
* fixed -Wshadow warnings
* refactored some constructors
Diffstat (limited to 'src/math/point.h')
-rw-r--r-- | src/math/point.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/math/point.h b/src/math/point.h index 65de94c..edb902b 100644 --- a/src/math/point.h +++ b/src/math/point.h @@ -52,16 +52,15 @@ struct Point //! Constructs a zero point: (0,0) inline Point() - { - LoadZero(); - } + : x(0.0f) + , y(0.0f) + {} //! Constructs a point from given coords: (x,y) - inline explicit Point(float x, float y) - { - this->x = x; - this->y = y; - } + inline explicit Point(float _x, float _y) + : x(_x) + , y(_y) + {} //! Sets the zero point: (0,0) inline void LoadZero() |