File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ struct rgb {
205
205
206
206
namespace detail {
207
207
208
- // a bit-packed variant of either an rgb color or a terminal color.
208
+ // a bit-packed variant of an RGB color, a terminal color, or unset color.
209
209
// see text_style for the bit-packing scheme.
210
210
struct color_type {
211
211
FMT_CONSTEXPR color_type () noexcept = default;
@@ -347,13 +347,13 @@ class text_style {
347
347
// / Creates a text style from the foreground (text) color.
348
348
FMT_CONSTEXPR inline auto fg (detail::color_type foreground) noexcept
349
349
-> text_style {
350
- return foreground.value_ | ( 1ULL << 24 ) ;
350
+ return foreground.value_ ;
351
351
}
352
352
353
353
// / Creates a text style from the background color.
354
354
FMT_CONSTEXPR inline auto bg (detail::color_type background) noexcept
355
355
-> text_style {
356
- return (background.value_ | ( 1ULL << 24 ) ) << 27 ;
356
+ return static_cast < uint64_t > (background.value_ ) << 27 ;
357
357
}
358
358
359
359
FMT_CONSTEXPR inline auto operator |(emphasis lhs, emphasis rhs) noexcept
You can’t perform that action at this time.
0 commit comments