summaryrefslogtreecommitdiffstats
path: root/src/math/vector.h
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2013-05-27 22:26:44 +0200
committerPiotr Dziwinski <piotrdz@gmail.com>2013-05-27 22:29:42 +0200
commitb22d852b4c4aa89e0394397a703ecfa442b0a928 (patch)
treea1e29142aabf11393eb3e0604deb4b89a6124fe7 /src/math/vector.h
parent12313fecf5a0ccad45f88575a24582b8363bd5a7 (diff)
downloadcolobot-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/vector.h')
-rw-r--r--src/math/vector.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/math/vector.h b/src/math/vector.h
index 38886d0..6827785 100644
--- a/src/math/vector.h
+++ b/src/math/vector.h
@@ -57,17 +57,17 @@ struct Vector
//! Creates a zero vector (0, 0, 0)
inline Vector()
- {
- LoadZero();
- }
+ : x(0.0f)
+ , y(0.0f)
+ , z(0.0f)
+ {}
//! Creates a vector from given values
- inline explicit Vector(float x, float y, float z)
- {
- this->x = x;
- this->y = y;
- this->z = z;
- }
+ inline explicit Vector(float _x, float _y, float _z)
+ : x(_x)
+ , y(_y)
+ , z(_z)
+ {}
//! Loads the zero vector (0, 0, 0)
inline void LoadZero()