hopefully fixed a warning

This commit is contained in:
Niels 2016-04-29 21:23:13 +02:00
parent 74544b42af
commit 62f81a60d7
2 changed files with 8 additions and 4 deletions

View file

@ -6078,9 +6078,11 @@ class basic_json
{
// convert a number 0..15 to its hex representation
// (0..f)
auto hexify = [](const char v) -> char
const auto hexify = [](const int v) -> char
{
return (v < 10) ? ('0' + v) : ('a' + v - 10);
return (v < 10)
? ('0' + static_cast<char>(v))
: ('a' + static_cast<char>(v - 10));
};
// print character c as \uxxxx

View file

@ -6078,9 +6078,11 @@ class basic_json
{
// convert a number 0..15 to its hex representation
// (0..f)
auto hexify = [](const char v) -> char
const auto hexify = [](const int v) -> char
{
return (v < 10) ? ('0' + v) : ('a' + v - 10);
return (v < 10)
? ('0' + static_cast<char>(v))
: ('a' + static_cast<char>(v - 10));
};
// print character c as \uxxxx