Fixed a "comparison between signed and unsigned" warning/error.

This commit is contained in:
Aaron Jacobs 2011-05-24 23:08:59 +00:00
parent 39ba2dbea9
commit f40c880585

View File

@ -729,7 +729,7 @@ Value::asUInt() const
return 0;
case intValue:
JSON_ASSERT_MESSAGE( value_.int_ >= 0, "Negative integer can not be converted to unsigned integer" );
JSON_ASSERT_MESSAGE( value_.int_ <= maxUInt, "signed integer out of UInt range" );
JSON_ASSERT_MESSAGE( UInt(value_.int_) <= maxUInt, "signed integer out of UInt range" );
return UInt(value_.int_);
case uintValue:
JSON_ASSERT_MESSAGE( value_.uint_ <= maxUInt, "unsigned integer out of UInt range" );