diff --git a/src/libxrpl/basics/Number.cpp b/src/libxrpl/basics/Number.cpp index 4a9a5c9947..41516a9fe1 100644 --- a/src/libxrpl/basics/Number.cpp +++ b/src/libxrpl/basics/Number.cpp @@ -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); 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); diff --git a/src/libxrpl/protocol/Rules.cpp b/src/libxrpl/protocol/Rules.cpp index d71bb77f66..197139027a 100644 --- a/src/libxrpl/protocol/Rules.cpp +++ b/src/libxrpl/protocol/Rules.cpp @@ -45,7 +45,7 @@ setCurrentTransactionRules(std::optional 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(