Address AI review feedback: tautological assert, typo in comment

This commit is contained in:
Ed Hennis
2026-07-13 17:24:52 -04:00
parent 2e46032f96
commit 7b2a91f5aa
2 changed files with 3 additions and 3 deletions

View File

@@ -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);

View File

@@ -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(