mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
fixup! Continue with Step 1
This commit is contained in:
@@ -356,7 +356,7 @@ Number::operator-() const noexcept
|
||||
inline Number&
|
||||
Number::operator++()
|
||||
{
|
||||
*this += Number{1000000000000000, -15, unchecked{}};
|
||||
*this += one();
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -371,7 +371,7 @@ Number::operator++(int)
|
||||
inline Number&
|
||||
Number::operator--()
|
||||
{
|
||||
*this -= Number{1000000000000000, -15, unchecked{}};
|
||||
*this -= one();
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
@@ -563,13 +563,13 @@ inline std::tuple<STAmount::mantissa_type, STAmount::exponent_type, bool>
|
||||
STAmount::scaleNumber(A const& asset, Number const& number)
|
||||
{
|
||||
bool const negative = number.mantissa() < 0;
|
||||
Number const working{negative ? -number : number};
|
||||
if (asset.integral())
|
||||
{
|
||||
return std::make_tuple(std::int64_t(number), 0, negative);
|
||||
return std::make_tuple(std::int64_t(working), 0, negative);
|
||||
}
|
||||
else
|
||||
{
|
||||
Number const working{negative ? -number : number};
|
||||
auto const [mantissa, exponent] =
|
||||
working.normalizeToRange(cMinValue, cMaxValue);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user