Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] master from open-source-parsers:master #6

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix comparison warnings caused by 54fc4e2 (open-source-parsers#1575)
Co-authored-by: Jordan Bayles <[email protected]>
  • Loading branch information
JensMertelmeyer and baylesj authored Dec 5, 2024
commit dca8a24cf8da1fc61b5cf0422cad03474124196c
6 changes: 3 additions & 3 deletions src/lib_json/json_value.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ Value::UInt Value::asUInt() const {
JSON_ASSERT_MESSAGE(isUInt(), "LargestUInt out of UInt range");
return UInt(value_.uint_);
case realValue:
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt),
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0u, maxUInt),
"double out of UInt range");
return UInt(value_.real_);
case nullValue:
Expand Down Expand Up @@ -733,7 +733,7 @@ Value::UInt64 Value::asUInt64() const {
case uintValue:
return UInt64(value_.uint_);
case realValue:
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0, maxUInt64),
JSON_ASSERT_MESSAGE(InRange(value_.real_, 0u, maxUInt64),
"double out of UInt64 range");
return UInt64(value_.real_);
case nullValue:
Expand Down Expand Up @@ -844,7 +844,7 @@ bool Value::isConvertibleTo(ValueType other) const {
type() == booleanValue || type() == nullValue;
case uintValue:
return isUInt() ||
(type() == realValue && InRange(value_.real_, 0, maxUInt)) ||
(type() == realValue && InRange(value_.real_, 0u, maxUInt)) ||
type() == booleanValue || type() == nullValue;
case realValue:
return isNumeric() || type() == booleanValue || type() == nullValue;
Expand Down
Loading