Double buffering no more

This commit is contained in:
Victor Zverovich
2020-07-10 07:50:37 -07:00
parent 36406509d9
commit a2c4fed981
12 changed files with 109 additions and 112 deletions
+5 -1
View File
@@ -124,7 +124,7 @@ void detail::format_windows_error(detail::buffer<char>& out, int error_code,
if (result != 0) {
utf16_to_utf8 utf8_message;
if (utf8_message.convert(system_message) == ERROR_SUCCESS) {
format_to(std::back_inserter(out), "{}: {}", message, utf8_message);
format_to(buffer_appender<char>(out), "{}: {}", message, utf8_message);
return;
}
break;
@@ -313,5 +313,9 @@ long getpagesize() {
return size;
# endif
}
void direct_buffered_file::grow(size_t) {
if (this->size() == BUFSIZ) flush();
}
#endif // FMT_USE_FCNTL
FMT_END_NAMESPACE