Skip to content

Commit 841f49e

Browse files
committed
Default constructor for Color
1 parent f3fd0ea commit 841f49e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

util/colors.hh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,18 @@ struct Color {
2727
uint8_t r, g, b;
2828
};
2929

30-
explicit constexpr Color(uint8_t r = 0, uint8_t g = 0, uint8_t b = 0)
30+
explicit constexpr Color(uint8_t r, uint8_t g, uint8_t b)
3131
: r_(r)
3232
, g_(g)
3333
, b_(b) {
3434
}
3535

36+
constexpr Color()
37+
: r_(0)
38+
, g_(0)
39+
, b_(0) {
40+
}
41+
3642
constexpr Color(uint16_t rgb565)
3743
: r_((rgb565 & 0xf800) >> 8)
3844
, g_((rgb565 & 0x07e0) >> 3)

0 commit comments

Comments
 (0)