@@ -190,11 +190,11 @@ enum class emphasis : uint8_t {
190190// rgb is a struct for red, green and blue colors.
191191// Using the name "rgb" makes some editors show the color in a tooltip.
192192struct rgb {
193- FMT_CONSTEXPR rgb () : r(0 ), g(0 ), b(0 ) {}
194- FMT_CONSTEXPR rgb (uint8_t r_, uint8_t g_, uint8_t b_) : r(r_), g(g_), b(b_) {}
195- FMT_CONSTEXPR rgb (uint32_t hex)
193+ constexpr rgb () : r(0 ), g(0 ), b(0 ) {}
194+ constexpr rgb (uint8_t r_, uint8_t g_, uint8_t b_) : r(r_), g(g_), b(b_) {}
195+ constexpr rgb (uint32_t hex)
196196 : r((hex >> 16 ) & 0xFF), g((hex >> 8 ) & 0xFF), b(hex & 0xFF ) {}
197- FMT_CONSTEXPR rgb (color hex)
197+ constexpr rgb (color hex)
198198 : r((uint32_t (hex) >> 16) & 0xFF),
199199 g((uint32_t (hex) >> 8) & 0xFF),
200200 b(uint32_t (hex) & 0xFF) {}
@@ -205,30 +205,30 @@ struct rgb {
205205
206206namespace detail {
207207
208- // a bit-packed variant of an RGB color, a terminal color, or unset color.
208+ // A bit-packed variant of an RGB color, a terminal color, or unset color.
209209// see text_style for the bit-packing scheme.
210210struct color_type {
211- FMT_CONSTEXPR color_type () noexcept = default;
212- FMT_CONSTEXPR color_type (color rgb_color) noexcept
211+ constexpr color_type () noexcept = default;
212+ constexpr color_type (color rgb_color) noexcept
213213 : value_(static_cast <uint32_t >(rgb_color) | (1 << 24 )) {}
214- FMT_CONSTEXPR color_type (rgb rgb_color) noexcept
214+ constexpr color_type (rgb rgb_color) noexcept
215215 : color_type(static_cast <color>(
216216 (static_cast <uint32_t >(rgb_color.r) << 16) |
217217 (static_cast <uint32_t >(rgb_color.g) << 8) | rgb_color.b)) {}
218- FMT_CONSTEXPR color_type (terminal_color term_color) noexcept
218+ constexpr color_type (terminal_color term_color) noexcept
219219 : value_(static_cast <uint32_t >(term_color) | (3 << 24 )) {}
220220
221- FMT_CONSTEXPR auto is_terminal_color () const noexcept -> bool {
221+ constexpr auto is_terminal_color () const noexcept -> bool {
222222 return (value_ & (1 << 25 )) != 0 ;
223223 }
224224
225- FMT_CONSTEXPR auto value () const noexcept -> uint32_t {
225+ constexpr auto value () const noexcept -> uint32_t {
226226 return value_ & 0xFFFFFF ;
227227 }
228228
229- FMT_CONSTEXPR color_type (uint32_t value) noexcept : value_(value) {}
229+ constexpr color_type (uint32_t value) noexcept : value_(value) {}
230230
231- uint32_t value_{} ;
231+ uint32_t value_ = 0 ;
232232};
233233} // namespace detail
234234
@@ -341,7 +341,7 @@ class text_style {
341341 friend FMT_CONSTEXPR auto bg (detail::color_type background) noexcept
342342 -> text_style;
343343
344- uint64_t style_{} ;
344+ uint64_t style_ = 0 ;
345345};
346346
347347// / Creates a text style from the foreground (text) color.
@@ -490,7 +490,7 @@ void vformat_to(buffer<Char>& buf, text_style ts, basic_string_view<Char> fmt,
490490 buf.append (background.begin (), background.end ());
491491 }
492492 vformat_to (buf, fmt, args);
493- if (ts != text_style{} ) reset_color<Char>(buf);
493+ if (ts != text_style () ) reset_color<Char>(buf);
494494}
495495} // namespace detail
496496
0 commit comments