Review feedback from @gregtatcam: STAmount

- Fix a couple of typos.
- Make fewer unneeded copies in roundToScale.
This commit is contained in:
Ed Hennis
2025-11-22 22:30:06 -05:00
parent f8ee979ff4
commit fa2dea84c2
2 changed files with 13 additions and 11 deletions

View File

@@ -701,7 +701,7 @@ getRate(STAmount const& offerOut, STAmount const& offerIn);
*/
STAmount
roundToScale(
STAmount value,
STAmount const& value,
std::int32_t scale,
Number::rounding_mode rounding = Number::getround());
@@ -729,7 +729,7 @@ roundToAsset(
STAmount const ret{asset, value};
if (ret.integral())
return ret;
// Not that the ctor will round integral types (XRP, MPT) via canonicalize,
// Note that the ctor will round integral types (XRP, MPT) via canonicalize,
// so no extra work is needed for those.
return roundToScale(ret, scale);
}