Skip to content

Commit

Permalink
Fix wchar_t to char conversion warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Vladislav Shchapov <[email protected]>
  • Loading branch information
phprus committed Dec 19, 2023
1 parent 9165434 commit c8e4765
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2130,7 +2130,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
case presentation_type::none:
case presentation_type::dec: {
num_digits = count_digits(value);
format_decimal<Char>(appender(buffer), value, num_digits);
format_decimal<char>(appender(buffer), value, num_digits);
break;
}
case presentation_type::hex_lower:
Expand All @@ -2139,7 +2139,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
if (specs.alt)
prefix_append(prefix, unsigned(upper ? 'X' : 'x') << 8 | '0');
num_digits = count_digits<4>(value);
format_uint<4, Char>(appender(buffer), value, num_digits, upper);
format_uint<4, char>(appender(buffer), value, num_digits, upper);
break;
}
case presentation_type::bin_lower:
Expand All @@ -2148,7 +2148,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
if (specs.alt)
prefix_append(prefix, unsigned(upper ? 'B' : 'b') << 8 | '0');
num_digits = count_digits<1>(value);
format_uint<1, Char>(appender(buffer), value, num_digits);
format_uint<1, char>(appender(buffer), value, num_digits);
break;
}
case presentation_type::oct: {
Expand All @@ -2157,7 +2157,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix,
// is not greater than the number of digits.
if (specs.alt && specs.precision <= num_digits && value != 0)
prefix_append(prefix, '0');
format_uint<3, Char>(appender(buffer), value, num_digits);
format_uint<3, char>(appender(buffer), value, num_digits);
break;
}
case presentation_type::chr:
Expand Down

0 comments on commit c8e4765

Please sign in to comment.