Add comment for a line of code

This commit is contained in:
Hongxu Xu 2020-11-14 10:13:12 +08:00 committed by GitHub
commit b1600bee60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -396,8 +396,6 @@ String ^ UnitConverterViewModel::ConvertToLocalizedString(const std::wstring& st
// Copy back the edited string to the result // Copy back the edited string to the result
result = ref new String(resultWithDecimal.c_str()); result = ref new String(resultWithDecimal.c_str());
} }
currencyFormatter->FractionDigits = lastCurrencyFractionDigits;
} }
wstring resultHolder = wstring(result->Data()); wstring resultHolder = wstring(result->Data());
@ -409,6 +407,10 @@ String ^ UnitConverterViewModel::ConvertToLocalizedString(const std::wstring& st
} }
result = L"-" + result; result = L"-" + result;
} }
// restore the original fraction digits
currencyFormatter->FractionDigits = lastCurrencyFractionDigits;
return result; return result;
} }