Use default 0 precision in the float formatting (bug #4096)

experimental
Andrei Kortunov 7 years ago
parent f594eda574
commit 4bb349a525

@ -34,21 +34,19 @@ namespace Misc
if (i < m.size())
{
int precision = 0;
bool precisionSet = false;
int precision = -1;
if (m[i] == '.')
{
precision = 0;
while (++i < m.size() && m[i] >= '0' && m[i] <= '9')
{
precision = precision * 10 + (m[i] - '0');
precisionSet = true;
}
}
if (i < m.size())
{
width = (widthSet) ? width : -1;
precision = (precisionSet) ? precision : -1;
if (m[i] == 'S' || m[i] == 's')
visitedPlaceholder(StringPlaceholder, pad, width, precision);

Loading…
Cancel
Save