Skip to content

Commit

Permalink
Silence some implicit conversion warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chase Geigle committed Jan 29, 2017
1 parent 705b9ab commit 941227b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions include/cpptoml.h
Original file line number Diff line number Diff line change
Expand Up @@ -2238,8 +2238,9 @@ class parser
uint32_t hex_to_digit(char c)
{
if (is_number(c))
return c - '0';
return 10 + c - ((c >= 'a' && c <= 'f') ? 'a' : 'A');
return static_cast<uint32_t>(c - '0');
return 10 + static_cast<uint32_t>(
c - ((c >= 'a' && c <= 'f') ? 'a' : 'A'));
}

std::shared_ptr<base> parse_number(std::string::iterator& it,
Expand Down

0 comments on commit 941227b

Please sign in to comment.