From 74ecf4976e8afc835826a960e7ed119d9104e318 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Sat, 21 Mar 2015 16:32:07 +0000 Subject: [PATCH] Fix Color constructor not constexpr --- src/color.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/color.hh b/src/color.hh index ae146812..8c073ac4 100644 --- a/src/color.hh +++ b/src/color.hh @@ -30,9 +30,9 @@ struct Color unsigned char g; unsigned char b; - Color() : Color{Colors::Default} {} - Color(Colors c) : color{c}, r{0}, g{0}, b{0} {} - Color(unsigned char r, unsigned char g, unsigned char b) + constexpr Color() : Color{Colors::Default} {} + constexpr Color(Colors c) : color{c}, r{0}, g{0}, b{0} {} + constexpr Color(unsigned char r, unsigned char g, unsigned char b) : color{Colors::RGB}, r{r}, g{g}, b{b} {} };