Skip to content

Commit

Permalink
Fix a warning (#2233)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Apr 16, 2021
1 parent 52bd62c commit 6271406
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2400,7 +2400,7 @@ FMT_CONSTEXPR int parse_nonnegative_int(const Char*& begin, const Char* end,
FMT_ASSERT(begin != end && '0' <= *begin && *begin <= '9', "");
unsigned value = 0;
// Convert to unsigned to prevent a warning.
constexpr unsigned max_int = max_value<int>();
const unsigned max_int = to_unsigned(max_value<int>());
unsigned big = max_int / 10;
do {
// Check for overflow.
Expand Down

0 comments on commit 6271406

Please sign in to comment.