Avoid unnecessary check.

This commit is contained in:
Victor Zverovich 2014-06-06 08:54:37 -07:00
parent 8ed2243a3c
commit 533c8214d4

View File

@ -655,9 +655,10 @@ void fmt::BasicWriter<Char>::PrintfParser::Format(
int precision = -1; int precision = -1;
switch (have_width) { switch (have_width) {
case false: case false: {
// TODO: parse optional flags // TODO: parse optional flags
for (bool stop = false; !stop;) { bool stop = false;
do {
switch (*s) { switch (*s) {
case '-': case '-':
++s; ++s;
@ -677,7 +678,7 @@ void fmt::BasicWriter<Char>::PrintfParser::Format(
default: default:
stop = true; stop = true;
} }
} } while (!stop);
/* /*
// Parse fill and alignment. // Parse fill and alignment.
@ -740,6 +741,7 @@ void fmt::BasicWriter<Char>::PrintfParser::Format(
if (*s < '0' || *s > '9') if (*s < '0' || *s > '9')
break; break;
spec.width_ = internal::ParseNonnegativeInt(s, error); spec.width_ = internal::ParseNonnegativeInt(s, error);
}
// Fall through. // Fall through.
default: default:
if (spec.fill_ == '0') { if (spec.fill_ == '0') {