mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-24 21:55:56 +00:00
refactor: Replace all old instances of Config with New Config (#1627)
Fixes #1184 Previous PR's found [here](https://github.com/XRPLF/clio/pull/1593) and [here](https://github.com/XRPLF/clio/pull/1544)
This commit is contained in:
@@ -95,9 +95,11 @@ PositiveDouble::checkTypeImpl(Value const& num) const
|
||||
std::optional<Error>
|
||||
PositiveDouble::checkValueImpl(Value const& num) const
|
||||
{
|
||||
if (std::holds_alternative<int64_t>(num) && std::get<int64_t>(num) >= 0)
|
||||
return std::nullopt;
|
||||
if (std::get<double>(num) >= 0)
|
||||
return std::nullopt;
|
||||
return Error{"Double number must be greater than 0"};
|
||||
return Error{"Double number must be greater than or equal to 0"};
|
||||
}
|
||||
|
||||
} // namespace util::config
|
||||
|
||||
Reference in New Issue
Block a user