diff options
Diffstat (limited to 'src/graphics/core')
-rw-r--r-- | src/graphics/core/color.cpp | 2 | ||||
-rw-r--r-- | src/graphics/core/color.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/graphics/core/color.cpp b/src/graphics/core/color.cpp index 8dec0e4..f241227 100644 --- a/src/graphics/core/color.cpp +++ b/src/graphics/core/color.cpp @@ -79,7 +79,7 @@ Gfx::Color Gfx::HSV2RGB(Gfx::ColorHSV color) { if ( color.h == 360.0f ) color.h = 0.0f; color.h /= 60.0f; - int i = (int)color.h; // integer part (0 .. 5) + int i = static_cast<int>(color.h); // integer part (0 .. 5) float f = color.h-i; // fractional part float v = color.v; diff --git a/src/graphics/core/color.h b/src/graphics/core/color.h index 907a3b9..6973644 100644 --- a/src/graphics/core/color.h +++ b/src/graphics/core/color.h @@ -44,13 +44,13 @@ struct Color //! 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 a string (r, g, b, a) |