fix width
This commit is contained in:
parent
f260bc2b0c
commit
6b0f31a0c2
1 changed files with 2 additions and 2 deletions
|
@ -13,9 +13,9 @@ std::string formatCentAsEuroString(const int cent, int width)
|
||||||
currStream << std::right << std::setw(width) << std::showbase
|
currStream << std::right << std::setw(width) << std::showbase
|
||||||
<< std::put_money(cent, false);
|
<< std::put_money(cent, false);
|
||||||
} catch (std::runtime_error& err) {
|
} catch (std::runtime_error& err) {
|
||||||
currStream << std::fixed << std::setw(width - 2) << std::setprecision(2) << cent / 100.0L
|
currStream << std::fixed << std::setw(width >= 4 ? width - 4 : width) << std::setprecision(2) << cent / 100.0L
|
||||||
<< " €";
|
<< " €";
|
||||||
}
|
}
|
||||||
|
|
||||||
return currStream.str();
|
return currStream.str();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue