mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-07 02:36:47 +00:00
Merge remote-tracking branch 'XRPLF/ximinez/number-round-maxrep-down' into ximinez/number-round-maxrep
* XRPLF/ximinez/number-round-maxrep-down: Fix formatting, add an assert
This commit is contained in:
@@ -528,6 +528,9 @@ Number::Guard::doRoundDown(bool& negative, T& mantissa, int& exponent)
|
||||
{
|
||||
// If there was any remainder, subtract 1 from the result. This is sufficient to get the
|
||||
// best rounding.
|
||||
XRPL_ASSERT(
|
||||
empty() || mantissa > maxMantissa_,
|
||||
"xrpl::Number::Guard::doRoundDown : mantissa is expected size");
|
||||
if (r != Round::Exact)
|
||||
{
|
||||
--mantissa;
|
||||
|
||||
Reference in New Issue
Block a user