diff --git a/include/fmt/format.h b/include/fmt/format.h index 7dbe90c2..fe46193f 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -800,10 +800,10 @@ template struct FMT_EXTERN_TEMPLATE_API basic_data { // This is a function instead of an array to workaround a bug in GCC10 (#1810). FMT_INLINE uint16_t bsr2log10(int bsr) { constexpr uint16_t data[] = { - 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, - 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, - 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, - 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20}; + 1, 1, 1, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, + 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 9, 10, 10, 10, + 10, 11, 11, 11, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 15, 15, + 15, 16, 16, 16, 16, 17, 17, 17, 18, 18, 18, 19, 19, 19, 19, 20}; return data[bsr]; } @@ -1632,9 +1632,9 @@ template struct int_writer { } if (prefix_size != 0) p[-1] = static_cast('-'); auto data = buffer.data(); - out = write_padded(out, specs, usize, usize, [=](iterator it) { - return copy_str(data, data + size, it); - }); + out = write_padded( + out, specs, usize, usize, + [=](iterator it) { return copy_str(data, data + size, it); }); } void on_chr() { *out++ = static_cast(abs_value); } diff --git a/src/os.cc b/src/os.cc index ae89b9c0..17214c73 100644 --- a/src/os.cc +++ b/src/os.cc @@ -124,7 +124,8 @@ void detail::format_windows_error(detail::buffer& out, int error_code, if (result != 0) { utf16_to_utf8 utf8_message; if (utf8_message.convert(system_message) == ERROR_SUCCESS) { - format_to(buffer_appender(out), "{}: {}", message, utf8_message); + format_to(buffer_appender(out), "{}: {}", message, + utf8_message); return; } break; @@ -288,12 +289,12 @@ void file::pipe(file& read_end, file& write_end) { } buffered_file file::fdopen(const char* mode) { - // Don't retry as fdopen doesn't return EINTR. - #if defined(__MINGW32__) && defined(_POSIX_) +// Don't retry as fdopen doesn't return EINTR. +# if defined(__MINGW32__) && defined(_POSIX_) FILE* f = ::fdopen(fd_, mode); - #else +# else FILE* f = FMT_POSIX_CALL(fdopen(fd_, mode)); - #endif +# endif if (!f) FMT_THROW( system_error(errno, "cannot associate stream with file descriptor"));