From dbbbc3aa80e4f9bf69a976768be7ee8751f2ce8b Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 21 Mar 2015 16:32:22 +0000 Subject: [PATCH] constexprify Face --- src/face.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/face.hh b/src/face.hh index 56c73856..f0f9d34a 100644 --- a/src/face.hh +++ b/src/face.hh @@ -25,19 +25,19 @@ struct Face Color bg; Attribute attributes; - Face(Color fg = Colors::Default, Color bg = Colors::Default, + constexpr Face(Color fg = Colors::Default, Color bg = Colors::Default, Attribute attributes = Attribute::Normal) : fg{fg}, bg{bg}, attributes{attributes} {} }; -inline bool operator==(const Face& lhs, const Face& rhs) +constexpr bool operator==(const Face& lhs, const Face& rhs) { return lhs.fg == rhs.fg and lhs.bg == rhs.bg and lhs.attributes == rhs.attributes; } -inline bool operator!=(const Face& lhs, const Face& rhs) +constexpr bool operator!=(const Face& lhs, const Face& rhs) { return not (lhs == rhs); }