Skip to content

Commit

Permalink
addressing nits.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwinterb authored and vitaut committed May 19, 2021
1 parent be48f4d commit 2a2e4c5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/fmt/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,11 @@ FMT_CONSTEXPR typename std::make_unsigned<Int>::type to_unsigned(Int value) {
FMT_MSC_WARNING(suppress : 4566) constexpr unsigned char micro[] = "\u00B5";

constexpr bool is_utf8() {
// avoid buggy sign extensions in MSVC's constant evaluation mode
// Avoid buggy sign extensions in MSVC's constant evaluation mode.
// https://developercommunity.visualstudio.com/t/C-difference-in-behavior-for-unsigned/1233612
using uchar = unsigned char;
return FMT_UNICODE || (sizeof(micro) == 3 && uchar{micro[0]} == 0xC2 &&
uchar{micro[1]} == 0xB5);
return FMT_UNICODE || (sizeof(micro) == 3 && uchar(micro[0]) == 0xC2 &&
uchar(micro[1]) == 0xB5);
}
FMT_END_DETAIL_NAMESPACE

Expand Down

0 comments on commit 2a2e4c5

Please sign in to comment.