Skip to content

Commit dca8a24

Browse files
Fix comparison warnings caused by 54fc4e2 (#1575)
Co-authored-by: Jordan Bayles <[email protected]>
1 parent 3f86349 commit dca8a24

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/lib_json/json_value.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,7 @@ Value::UInt Value::asUInt() const {
684684
JSON_ASSERT_MESSAGE(isUInt(), "LargestUInt out of UInt range");
685685
return UInt(value_.uint_);
686686
case realValue:
687-
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt),
687+
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0u, maxUInt),
688688
"double out of UInt range");
689689
return UInt(value_.real_);
690690
case nullValue:
@@ -733,7 +733,7 @@ Value::UInt64 Value::asUInt64() const {
733733
case uintValue:
734734
return UInt64(value_.uint_);
735735
case realValue:
736-
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64),
736+
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0u, maxUInt64),
737737
"double out of UInt64 range");
738738
return UInt64(value_.real_);
739739
case nullValue:
@@ -844,7 +844,7 @@ bool Value::isConvertibleTo(ValueType other) const {
844844
type() == booleanValue || type() == nullValue;
845845
case uintValue:
846846
return isUInt() ||
847-
(type() == realValue && InRange(value_.real_, 0, maxUInt)) ||
847+
(type() == realValue && InRange(value_.real_, 0u, maxUInt)) ||
848848
type() == booleanValue || type() == nullValue;
849849
case realValue:
850850
return isNumeric() || type() == booleanValue || type() == nullValue;

0 commit comments

Comments
 (0)