From e9b9b0aefaf3dacf8554ba93bd404248574945ed Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Thu, 18 Jul 2019 06:28:53 +0200 Subject: [PATCH] clang-format --- include/fmt/core.h | 4 ++-- include/fmt/format.h | 13 ++++++------- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/fmt/core.h b/include/fmt/core.h index 981da4de..898d447d 100644 --- a/include/fmt/core.h +++ b/include/fmt/core.h @@ -1201,8 +1201,8 @@ template class basic_format_args { int max_size() const { unsigned long long max_packed = internal::max_packed_args; - return static_cast( - is_packed() ? max_packed : types_ & ~internal::is_unpacked_bit); + return static_cast(is_packed() ? max_packed + : types_ & ~internal::is_unpacked_bit); } }; diff --git a/include/fmt/format.h b/include/fmt/format.h index a9b27ff9..ea6678db 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1588,7 +1588,7 @@ template class basic_writer { template void write_padded(const format_specs& specs, F&& f) { // User-perceived width (in code points). unsigned width = to_unsigned(specs.width); - size_t size = f.size(); // The number of code units. + size_t size = f.size(); // The number of code units. size_t num_code_points = width != 0 ? f.width() : size; if (width <= num_code_points) return f(reserve(size)); auto&& it = reserve(width + (size - num_code_points)); @@ -2111,7 +2111,8 @@ struct string_view_metadata { template FMT_CONSTEXPR string_view_metadata(basic_string_view primary_string, basic_string_view view) - : offset_(to_unsigned(view.data() - primary_string.data())), size_(view.size()) {} + : offset_(to_unsigned(view.data() - primary_string.data())), + size_(view.size()) {} FMT_CONSTEXPR string_view_metadata(std::size_t offset, std::size_t size) : offset_(offset), size_(size) {} template @@ -2202,8 +2203,8 @@ class dynamic_specs_handler FMT_CONSTEXPR arg_ref_type make_arg_ref(basic_string_view arg_id) { context_.check_arg_id(arg_id); - basic_string_view format_str(context_.begin(), - to_unsigned(context_.end() - context_.begin())); + basic_string_view format_str( + context_.begin(), to_unsigned(context_.end() - context_.begin())); const auto id_metadata = string_view_metadata(format_str, arg_id); return arg_ref_type(id_metadata); } @@ -2257,9 +2258,7 @@ template struct precision_adapter { explicit FMT_CONSTEXPR precision_adapter(SpecHandler& h) : handler(h) {} FMT_CONSTEXPR void operator()() { handler.on_dynamic_precision(auto_id()); } - FMT_CONSTEXPR void operator()(int id) { - handler.on_dynamic_precision(id); - } + FMT_CONSTEXPR void operator()(int id) { handler.on_dynamic_precision(id); } FMT_CONSTEXPR void operator()(basic_string_view id) { handler.on_dynamic_precision(id); }