Correct buffer growth when formatting time (#367)

This commit is contained in:
Victor Zverovich
2016-08-04 08:47:59 -07:00
parent 9dbb60c4c8
commit 1a23f9c274
4 changed files with 31 additions and 11 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ void format(BasicFormatter<char, ArgFormatter> &f,
break;
}
const std::size_t MIN_GROWTH = 10;
buffer.reserve(buffer.capacity() + size > MIN_GROWTH ? size : MIN_GROWTH);
buffer.reserve(buffer.capacity() + (size > MIN_GROWTH ? size : MIN_GROWTH));
}
format_str = end + 1;
}