diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2015-03-21 16:32:22 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2015-03-21 16:32:22 +0000 |
| commit | dbbbc3aa80e4f9bf69a976768be7ee8751f2ce8b (patch) | |
| tree | 681dd448906bd4ee29b84fa45af15cc5cda57a43 /src/face.hh | |
| parent | 74ecf4976e8afc835826a960e7ed119d9104e318 (diff) | |
constexprify Face
Diffstat (limited to 'src/face.hh')
| -rw-r--r-- | src/face.hh | 6 |
1 files 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); } |
