summaryrefslogtreecommitdiff
path: root/src/color.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2015-03-20 19:03:41 +0000
committerMaxime Coste <frrrwww@gmail.com>2015-03-20 19:03:41 +0000
commitbbfcfe4242e50c8952ae6cf05436c81e9a5e8170 (patch)
tree1cbdd1ecd3a17930d0690a0ab0897f9d8167eb19 /src/color.hh
parent5cf7d650c8308a8c3a2de8ab61c763221a3de37e (diff)
constexprify Color (in)equality operator
Diffstat (limited to 'src/color.hh')
-rw-r--r--src/color.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/color.hh b/src/color.hh
index 1bf7ee33..ae146812 100644
--- a/src/color.hh
+++ b/src/color.hh
@@ -36,13 +36,13 @@ struct Color
: color{Colors::RGB}, r{r}, g{g}, b{b} {}
};
-inline bool operator==(Color lhs, Color rhs)
+constexpr bool operator==(Color lhs, Color rhs)
{
return lhs.color == rhs.color and
lhs.r == rhs.r and lhs.g == rhs.g and lhs.b == rhs.b;
}
-inline bool operator!=(Color lhs, Color rhs)
+constexpr bool operator!=(Color lhs, Color rhs)
{
return not (lhs == rhs);
}