One more comment: clarifying roundingMode use in NumberPropertyMapper::oldToNew

This commit is contained in:
Hugo van der Merwe 2020-08-26 13:12:38 +02:00
parent e57d4a93f8
commit 9906ef6958

View file

@ -92,6 +92,8 @@ MacroProps NumberPropertyMapper::oldToNew(const DecimalFormatProperties& propert
int32_t minSig = properties.minimumSignificantDigits;
int32_t maxSig = properties.maximumSignificantDigits;
double roundingIncrement = properties.roundingIncrement;
// Not assigning directly to macros.roundingMode here: we change
// roundingMode if and when we also change macros.precision.
RoundingMode roundingMode = properties.roundingMode.getOrDefault(UNUM_ROUND_HALFEVEN);
bool explicitMinMaxFrac = minFrac != -1 || maxFrac != -1;
bool explicitMinMaxSig = minSig != -1 || maxSig != -1;