From b6ff95773d537db11820e11cbcc478c197d198cc Mon Sep 17 00:00:00 2001 From: Nicolas Lesser Date: Thu, 13 Dec 2018 20:52:45 +0100 Subject: [PATCH] Second attempt... --- include/fmt/color.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/fmt/color.h b/include/fmt/color.h index 78243eb5..b3e361a8 100644 --- a/include/fmt/color.h +++ b/include/fmt/color.h @@ -221,7 +221,7 @@ enum class emphasis : uint8_t { // We use rgb as name because some editors will show it as color direct in the // editor. struct rgb { - FMT_CONSTEXPR_DECL rgb() : r(0), g(0), b(0) {} + FMT_CONSTEXPR_DECL rgb() = default; FMT_CONSTEXPR_DECL rgb(uint8_t r_, uint8_t g_, uint8_t b_) : r(r_), g(g_), b(b_) {} FMT_CONSTEXPR_DECL rgb(uint32_t hex) @@ -229,9 +229,9 @@ struct rgb { FMT_CONSTEXPR_DECL rgb(color hex) : r((uint32_t(hex) >> 16) & 0xFF), g((uint32_t(hex) >> 8) & 0xFF), b(uint32_t(hex) & 0xFF) {} - uint8_t r; - uint8_t g; - uint8_t b; + uint8_t r = 0; + uint8_t g = 0; + uint8_t b = 0; }; namespace internal {