388 | @@ -389,22 +389,36 @@ string FormatMoney(int64 n, bool fPlus)
389 | {
390 | // Note: not using straight sprintf here because we do NOT want
391 | // localized number formatting.
392 | - int64 n_abs = (n > 0 ? n : -n);
393 | + if (!n)
Is this special case needed? Or can it simply be handled by the if (n>=0) case?
not needed. It could be removed if desired and and this case be treated generically by the rest of the code.
That being said, it must be discriminated anyway when handling the sign. Cannot prefix '+' or '-' to it. So why not leverage this to skip the whole processing.
Yes, the sign must be discriminated anyway, but for readability and flexibility it's best to have as little special cases as possible.