jsoncpp: Add missing cast to convert from char to UInt
When parsing digits we know our `c - '0'` expression results in a non-negative value due to preceding conditions. Simply cast the result to UInt. This fixes compilation on SolarisStudio 12.4.
This commit is contained in:
parent
7c0b22a84e
commit
a7fe4413d5
|
@ -529,7 +529,7 @@ bool Reader::decodeNumber(Token& token, Value& decoded) {
|
||||||
return addError("'" + std::string(token.start_, token.end_) +
|
return addError("'" + std::string(token.start_, token.end_) +
|
||||||
"' is not a number.",
|
"' is not a number.",
|
||||||
token);
|
token);
|
||||||
Value::UInt digit(c - '0');
|
Value::UInt digit(static_cast<Value::UInt>(c - '0'));
|
||||||
if (value >= threshold) {
|
if (value >= threshold) {
|
||||||
// We've hit or exceeded the max value divided by 10 (rounded down). If
|
// We've hit or exceeded the max value divided by 10 (rounded down). If
|
||||||
// a) we've only just touched the limit, b) this is the last digit, and
|
// a) we've only just touched the limit, b) this is the last digit, and
|
||||||
|
|
Loading…
Reference in New Issue