From d2eae359666334261f0c8347bebbbb14270dcee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Wed, 14 Dec 2016 15:25:51 +0100 Subject: [PATCH] Math: these functions are not constexpr. --- src/Magnum/Math/Color.h | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/Magnum/Math/Color.h b/src/Magnum/Math/Color.h index 44414897e..48f4a3be5 100644 --- a/src/Magnum/Math/Color.h +++ b/src/Magnum/Math/Color.h @@ -241,11 +241,11 @@ template class Color3: public Vector3 { * * Hue can overflow the range @f$ [0.0, 360.0] @f$. */ - constexpr static Color3 fromHSV(HSV hsv) { + static Color3 fromHSV(HSV hsv) { return Implementation::fromHSV(hsv); } /** @overload */ - constexpr static Color3 fromHSV(Deg hue, FloatingPointType saturation, FloatingPointType value) { + static Color3 fromHSV(Deg hue, FloatingPointType saturation, FloatingPointType value) { return fromHSV(std::make_tuple(hue, saturation, value)); } @@ -318,7 +318,7 @@ template class Color3: public Vector3 { * * @see @ref hue(), @ref saturation(), @ref value(), @ref fromHSV() */ - constexpr HSV toHSV() const { + HSV toHSV() const { return Implementation::toHSV(*this); } @@ -328,7 +328,7 @@ template class Color3: public Vector3 { * * @see @ref saturation(), @ref value(), @ref toHSV(), @ref fromHSV() */ - constexpr Deg hue() const { + Deg hue() const { return Deg(Implementation::hue(*this)); } @@ -338,7 +338,7 @@ template class Color3: public Vector3 { * * @see @ref hue(), @ref value(), @ref toHSV(), @ref fromHSV() */ - constexpr FloatingPointType saturation() const { + FloatingPointType saturation() const { return Implementation::saturation(*this); } @@ -348,7 +348,7 @@ template class Color3: public Vector3 { * * @see @ref hue(), @ref saturation(), @ref toHSV(), @ref fromHSV() */ - constexpr FloatingPointType value() const { + FloatingPointType value() const { return Implementation::value(*this); } @@ -446,11 +446,11 @@ class Color4: public Vector4 { * @param a Alpha value, defaults to `1.0` for floating-point types * and maximum positive value for integral types. */ - constexpr static Color4 fromHSV(HSV hsv, T a = Implementation::fullChannel()) { + static Color4 fromHSV(HSV hsv, T a = Implementation::fullChannel()) { return Color4(Implementation::fromHSV(hsv), a); } /** @overload */ - constexpr static Color4 fromHSV(Deg hue, FloatingPointType saturation, FloatingPointType value, T alpha = Implementation::fullChannel()) { + static Color4 fromHSV(Deg hue, FloatingPointType saturation, FloatingPointType value, T alpha = Implementation::fullChannel()) { return fromHSV(std::make_tuple(hue, saturation, value), alpha); } @@ -528,22 +528,22 @@ class Color4: public Vector4 { constexpr /*implicit*/ Color4(const Vector<4, T>& other) noexcept: Vector4(other) {} /** @copydoc Color3::toHSV() */ - constexpr HSV toHSV() const { + HSV toHSV() const { return Implementation::toHSV(Vector4::rgb()); } /** @copydoc Color3::hue() */ - constexpr Deg hue() const { + Deg hue() const { return Implementation::hue(Vector4::rgb()); } /** @copydoc Color3::saturation() */ - constexpr FloatingPointType saturation() const { + FloatingPointType saturation() const { return Implementation::saturation(Vector4::rgb()); } /** @copydoc Color3::value() */ - constexpr FloatingPointType value() const { + FloatingPointType value() const { return Implementation::value(Vector4::rgb()); }