From b22d852b4c4aa89e0394397a703ecfa442b0a928 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Mon, 27 May 2013 22:26:44 +0200 Subject: Fixed variable shadowing warnings * fixed -Wshadow warnings * refactored some constructors --- src/math/point.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/math/point.h') 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() -- cgit v1.2.3-1-g7c22