mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 07:30:30 +00:00
Address AI review feedback: tautological assert, typo in comment
This commit is contained in:
@@ -450,9 +450,9 @@ Number::Guard::pushOverflow(T mantissa)
|
||||
|
||||
auto const diff = mantissa - kMaxRep;
|
||||
auto const digit = (diff * 10) / spread;
|
||||
static_assert(std::unsigned_integral<decltype(digit)>);
|
||||
XRPL_ASSERT(
|
||||
digit >= 0 && digit < 10 && digit != 5,
|
||||
"xrpl::Number::Guard::pushOverflow : valid overflow digit");
|
||||
digit < 10 && digit != 5, "xrpl::Number::Guard::pushOverflow : valid overflow digit");
|
||||
|
||||
// Don't remove the digit from the mantissa, but add it to the guard as if it was.
|
||||
push(digit);
|
||||
|
||||
@@ -45,7 +45,7 @@ setCurrentTransactionRules(std::optional<Rules> r)
|
||||
// amendments must also be added to useRulesGuards.
|
||||
bool const enableLargeNumbers =
|
||||
!r || (r->enabled(featureSingleAssetVault) || r->enabled(featureLendingProtocol));
|
||||
// If enableLargeNumbers is true, then useRulesGuard must also return true.
|
||||
// If enableLargeNumbers is true, then useRulesGuards must also return true.
|
||||
// However, the reverse is not true. Other amendments can cause the rules guard to be used,
|
||||
// even though large numbers are _not_ used.
|
||||
XRPL_ASSERT(
|
||||
|
||||
Reference in New Issue
Block a user