From bb69a8892258c47a5321c419e9c54ba074df2566 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 12 Jan 2017 12:55:27 +0100 Subject: [PATCH] Math: fix double->float conversion warnings on MSVC. --- src/Magnum/Math/Color.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index 8327352d8..1ebc8f5a2 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -126,8 +126,8 @@ template inline typename Color3::Hsv toHsv(typename std::enable_if RGB conversion */ template typename std::enable_if::value, Color3>::type fromSrgb(const Vector3& srgb) { - constexpr const T a(0.055); - return lerp(srgb/T(12.92), pow((srgb + Vector3{a})/(T(1.0) + a), T(2.4)), srgb > Vector3(0.04045)); + constexpr const T a(T(0.055)); + return lerp(srgb/T(12.92), pow((srgb + Vector3{a})/(T(1.0) + a), T(2.4)), srgb > Vector3(T(0.04045))); } template typename std::enable_if::value, Color4>::type fromSrgbAlpha(const Vector4& srgbAlpha) { return {fromSrgb(srgbAlpha.rgb()), srgbAlpha.a()};