Fix compilation on pre C++11.

This commit is contained in:
Victor Zverovich 2012-12-24 11:58:49 -08:00
parent 100149eb58
commit 26d2ae6281

View File

@ -517,10 +517,12 @@ void Formatter::DoFormat() {
char *out = 0; char *out = 0;
if (spec.width > 1) { if (spec.width > 1) {
out = GrowBuffer(spec.width); out = GrowBuffer(spec.width);
if (spec.align == ALIGN_RIGHT) if (spec.align == ALIGN_RIGHT) {
out = std::fill_n(out, spec.width - 1, spec.fill); std::fill_n(out, spec.width - 1, spec.fill);
else out += spec.width - 1;
} else {
std::fill_n(out + 1, spec.width - 1, spec.fill); std::fill_n(out + 1, spec.width - 1, spec.fill);
}
} else { } else {
out = GrowBuffer(1); out = GrowBuffer(1);
} }