From c735a69ef8f42fe76f4e7605286d83d9f571ee54 Mon Sep 17 00:00:00 2001 From: stryku Date: Tue, 8 Jan 2019 00:20:52 +0100 Subject: [PATCH] Removed unnecessary changes --- include/fmt/format.h | 67 ++++++++++++++++++++----------------------- include/fmt/prepare.h | 5 ++-- test/format-test.cc | 6 ++-- 3 files changed, 35 insertions(+), 43 deletions(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index 20bc65c1..b52afa13 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1784,19 +1784,19 @@ struct dynamic_format_specs : basic_format_specs { // Format spec handler that saves references to arguments representing dynamic // width and precision to be resolved at formatting time. -template -class dynamic_specs_handler - : public specs_setter { - -public: +template +class dynamic_specs_handler : + public specs_setter { + public: typedef typename ParseContext::char_type char_type; -private: - typedef arg_ref arg_ref_type; + FMT_CONSTEXPR dynamic_specs_handler( + dynamic_format_specs &specs, ParseContext &ctx) + : specs_setter(specs), specs_(specs), context_(ctx) {} -public: - FMT_CONSTEXPR dynamic_specs_handler(Specs &specs, ParseContext &ctx) - : specs_setter(specs), specs_(specs), context_(ctx) {} + FMT_CONSTEXPR dynamic_specs_handler(const dynamic_specs_handler &other) + : specs_setter(other), + specs_(other.specs_), context_(other.context_) {} template FMT_CONSTEXPR void on_dynamic_width(Id arg_id) { @@ -1813,9 +1813,11 @@ public: } private: - FMT_CONSTEXPR arg_ref_type make_arg_ref(unsigned arg_id) { - context_.check_arg_id(arg_id); - return arg_ref_type(arg_id); + typedef arg_ref arg_ref_type; + + FMT_CONSTEXPR arg_ref_type make_arg_ref(unsigned arg_id) { + context_.check_arg_id(arg_id); + return arg_ref_type(arg_id); } FMT_CONSTEXPR arg_ref_type make_arg_ref(auto_id) { @@ -1829,8 +1831,7 @@ public: return arg_ref_type(id_metadata); } -private: - Specs &specs_; + dynamic_format_specs &specs_; ParseContext &context_; }; @@ -2183,8 +2184,8 @@ struct format_type : std::integral_constant::value != custom_type> {}; template