diff --git a/include/fmt/base.h b/include/fmt/base.h index f213fa098af5..8f9955bff471 100644 --- a/include/fmt/base.h +++ b/include/fmt/base.h @@ -1031,14 +1031,14 @@ constexpr auto in(type t, int set) -> bool { // Bitsets of types. enum { - sint_set = - set(type::int_type) | set(type::long_long_type) | set(type::int128_type), + sint_set = set(type::int_type) | set(type::long_long_type) | + set(type::int128_type), uint_set = set(type::uint_type) | set(type::ulong_long_type) | - set(type::uint128_type), + set(type::uint128_type), bool_set = set(type::bool_type), char_set = set(type::char_type), float_set = set(type::float_type) | set(type::double_type) | - set(type::long_double_type), + set(type::long_double_type), string_set = set(type::string_type), cstring_set = set(type::cstring_type), pointer_set = set(type::pointer_type) @@ -2685,7 +2685,9 @@ template struct runtime_format_string { * // Check format string at runtime instead of compile-time. * fmt::print(fmt::runtime("{:d}"), "I am not a number"); */ -inline auto runtime(string_view s) -> runtime_format_string<> { return {{s}}; } +inline auto runtime(string_view s) -> runtime_format_string<> { + return {{s}}; +} /// A compile-time format string. Use `format_string` in the public API to /// prevent type deduction. diff --git a/include/fmt/fmt-c.h b/include/fmt/fmt-c.h index 3f8714d41677..1c3d2388823f 100644 --- a/include/fmt/fmt-c.h +++ b/include/fmt/fmt-c.h @@ -201,10 +201,10 @@ typedef enum {} fmt_signed_char; (fmt_arg[]) { FMT_MAP(FMT_MAKE_ARG, ##__VA_ARGS__) } # define FMT_EXPAND(v) v -# define FMT_FORMAT_ARGS(fmt, ...) \ - (fmt), \ - FMT_EXPAND(FMT_VA_SELECT(FMT_MAKE_NULL, FMT_MAKE_ARGLIST, \ - ##__VA_ARGS__)(__VA_ARGS__)), \ +# define FMT_FORMAT_ARGS(fmt, ...) \ + (fmt), \ + FMT_EXPAND(FMT_VA_SELECT( \ + FMT_MAKE_NULL, FMT_MAKE_ARGLIST, ##__VA_ARGS__)(__VA_ARGS__)), \ FMT_NARG(, ##__VA_ARGS__) # define fmt_format(buffer, size, fmt, ...) \ diff --git a/include/fmt/format.h b/include/fmt/format.h index 3300b35b47dd..dcf519495f33 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -2007,7 +2007,7 @@ auto write_int(OutputIt out, UInt value, unsigned prefix, int num_digits = 0; auto buffer = memory_buffer(); switch (specs.type()) { - default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH; + default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH; case presentation_type::none: case presentation_type::dec: num_digits = count_digits(value); @@ -2136,7 +2136,7 @@ FMT_CONSTEXPR FMT_INLINE auto write_int(OutputIt out, write_int_arg arg, auto abs_value = arg.abs_value; auto prefix = arg.prefix; switch (specs.type()) { - default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH; + default: FMT_ASSERT(false, ""); FMT_FALLTHROUGH; case presentation_type::none: case presentation_type::dec: begin = do_format_decimal(buffer, abs_value, buffer_size);