-mpattern_formatter small change in pad3

This commit is contained in:
gabime 2018-06-15 13:56:12 +03:00
parent 58e09dbd33
commit ac6a2a4c0f

View File

@ -72,18 +72,19 @@ inline void append_and_pad3(int n, fmt::memory_buffer &dest)
if (n > 9) // 10-99
{
dest.push_back('0');
append_int(n, dest);
return;
}
if (n >= 0)
else if (n >= 0)
{
dest.push_back('0');
dest.push_back('0');
append_int(n, dest);
return;
}
// negatives (unlikely, but just in case let fmt deal with it)
fmt::format_to(dest, "{:03}", n);
else
{
fmt::format_to(dest, "{:03}", n);
return;
}
append_int(n, dest);
}
void append_and_pad6(int n, fmt::memory_buffer &dest)