Commit ac6a2a4c authored by gabime's avatar gabime

-mpattern_formatter small change in pad3

parent 58e09dbd
...@@ -72,18 +72,19 @@ inline void append_and_pad3(int n, fmt::memory_buffer &dest) ...@@ -72,18 +72,19 @@ inline void append_and_pad3(int n, fmt::memory_buffer &dest)
if (n > 9) // 10-99 if (n > 9) // 10-99
{ {
dest.push_back('0'); dest.push_back('0');
append_int(n, dest);
return;
} }
if (n >= 0) else if (n >= 0)
{ {
dest.push_back('0'); dest.push_back('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) // negatives (unlikely, but just in case let fmt deal with it)
else
{
fmt::format_to(dest, "{:03}", n); fmt::format_to(dest, "{:03}", n);
return;
}
append_int(n, dest);
} }
void append_and_pad6(int n, fmt::memory_buffer &dest) void append_and_pad6(int n, fmt::memory_buffer &dest)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment