From 497f0c26e741bf99885996c4ed37b67166e93f54 Mon Sep 17 00:00:00 2001 From: scribam Date: Mon, 3 Jun 2019 08:04:51 +0200 Subject: [PATCH] utilities: Add constexpr to color4_base For consistency with the others colorX_base --- Utilities/geometry.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Utilities/geometry.h b/Utilities/geometry.h index 8ffc05e168..6435afaa14 100644 --- a/Utilities/geometry.h +++ b/Utilities/geometry.h @@ -841,7 +841,7 @@ struct color4_base T xyzw[4]; }; - color4_base() + constexpr color4_base() : x{} , y{} , z{} @@ -849,7 +849,7 @@ struct color4_base { } - color4_base(T x, T y = {}, T z = {}, T w = {}) + constexpr color4_base(T x, T y = {}, T z = {}, T w = {}) : x(x) , y(y) , z(z) @@ -857,18 +857,18 @@ struct color4_base { } - bool operator == (const color4_base& rhs) const + constexpr bool operator == (const color4_base& rhs) const { return r == rhs.r && g == rhs.g && b == rhs.b && a == rhs.a; } - bool operator != (const color4_base& rhs) const + constexpr bool operator != (const color4_base& rhs) const { return !(*this == rhs); } template - operator color4_base() const + constexpr operator color4_base() const { return{ (NT)x, (NT)y, (NT)z, (NT)w }; }