diff options
author | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-30 22:59:18 +0200 |
---|---|---|
committer | Piotr Dziwinski <piotrdz@gmail.com> | 2012-07-30 22:59:18 +0200 |
commit | 5e637ca0288ddd631ec33e1d620cd4a73bcdc2be (patch) | |
tree | b26b0e9572f101744aba712133e646fb93ed58d2 /src/math/point.h | |
parent | d8a0c8d32e160e7ae86bb5b85ead8e5f71b1fd01 (diff) | |
download | colobot-5e637ca0288ddd631ec33e1d620cd4a73bcdc2be.tar.gz colobot-5e637ca0288ddd631ec33e1d620cd4a73bcdc2be.tar.bz2 colobot-5e637ca0288ddd631ec33e1d620cd4a73bcdc2be.zip |
Switched to new style casts
- rewrote old C-style casts to new ..._cast<>
- corrected some dangerous casts
- added -Wold-style-cast to compile flags
Diffstat (limited to 'src/math/point.h')
-rw-r--r-- | src/math/point.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/math/point.h b/src/math/point.h index 740b275..ea20db9 100644 --- a/src/math/point.h +++ b/src/math/point.h @@ -71,13 +71,13 @@ struct Point //! Returns the struct cast to \c float* array; use with care! inline float* Array() { - return (float*)this; + return reinterpret_cast<float*>(this); } //! Returns the struct cast to <tt>const float*</tt> array; use with care! inline const float* Array() const { - return (const float*)this; + return reinterpret_cast<const float*>(this); } //! Returns the distance from (0,0) to the point (x,y) |