diff --git a/examples/format.cc b/examples/format.cc index 98ade79..e477fbe 100644 --- a/examples/format.cc +++ b/examples/format.cc @@ -14,12 +14,12 @@ struct Foo { template bool to_format(Foo const &, R &writer, FormatSpec const &fs) { switch (fs.spec()) { - case 'i': - writer.put_string("Foo1"); - break; - default: - writer.put_string("Foo2"); - break; + case 'i': + writer.put_string("Foo1"); + break; + default: + writer.put_string("Foo2"); + break; } return true; } @@ -29,12 +29,12 @@ struct Bar { template bool to_format(R &writer, FormatSpec const &fs) const { switch (fs.spec()) { - case 'i': - writer.put_string("Bar1"); - break; - default: - writer.put_string("Bar2"); - break; + case 'i': + writer.put_string("Bar1"); + break; + default: + writer.put_string("Bar2"); + break; } return true; } diff --git a/ostd/format.hh b/ostd/format.hh index 87076a2..a7b2cb6 100644 --- a/ostd/format.hh +++ b/ostd/format.hh @@ -30,12 +30,12 @@ namespace detail { inline int parse_fmt_flags(ConstCharRange &fmt, int ret) { while (!fmt.empty()) { switch (fmt.front()) { - case '-': ret |= FMT_FLAG_DASH; fmt.pop_front(); break; - case '+': ret |= FMT_FLAG_PLUS; fmt.pop_front(); break; - case '#': ret |= FMT_FLAG_HASH; fmt.pop_front(); break; - case '0': ret |= FMT_FLAG_ZERO; fmt.pop_front(); break; - case ' ': ret |= FMT_FLAG_SPACE; fmt.pop_front(); break; - default: goto retflags; + case '-': ret |= FMT_FLAG_DASH; fmt.pop_front(); break; + case '+': ret |= FMT_FLAG_PLUS; fmt.pop_front(); break; + case '#': ret |= FMT_FLAG_HASH; fmt.pop_front(); break; + case '0': ret |= FMT_FLAG_ZERO; fmt.pop_front(); break; + case ' ': ret |= FMT_FLAG_SPACE; fmt.pop_front(); break; + default: goto retflags; } } retflags: