From 7709fc70eb69f2cf21a7d8d95527a235b2d5545f Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 23 Feb 2018 15:10:21 +0200 Subject: [PATCH] small fix to pattern_formatter ctor --- include/spdlog/details/pattern_formatter_impl.h | 4 ++-- include/spdlog/formatter.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/spdlog/details/pattern_formatter_impl.h b/include/spdlog/details/pattern_formatter_impl.h index 3946574e..72f29270 100644 --- a/include/spdlog/details/pattern_formatter_impl.h +++ b/include/spdlog/details/pattern_formatter_impl.h @@ -487,8 +487,8 @@ class full_formatter SPDLOG_FINAL:public flag_formatter /////////////////////////////////////////////////////////////////////////////// // pattern_formatter inline impl /////////////////////////////////////////////////////////////////////////////// -inline spdlog::pattern_formatter::pattern_formatter(const std::string& pattern, pattern_time_type pattern_time, std::string eol) - : _eol(move(eol)), _pattern_time(pattern_time) +inline spdlog::pattern_formatter::pattern_formatter(const std::string& pattern, pattern_time_type pattern_time, const std::string& eol) + : _eol(eol), _pattern_time(pattern_time) { compile_pattern(pattern); } diff --git a/include/spdlog/formatter.h b/include/spdlog/formatter.h index 39315764..b69d7eb1 100644 --- a/include/spdlog/formatter.h +++ b/include/spdlog/formatter.h @@ -29,7 +29,7 @@ class pattern_formatter SPDLOG_FINAL : public formatter { public: - explicit pattern_formatter(const std::string& pattern, pattern_time_type pattern_time = pattern_time_type::local, const std::string eol = spdlog::details::os::default_eol); + explicit pattern_formatter(const std::string& pattern, pattern_time_type pattern_time = pattern_time_type::local, const std::string& eol = spdlog::details::os::default_eol); pattern_formatter(const pattern_formatter&) = delete; pattern_formatter& operator=(const pattern_formatter&) = delete; void format(details::log_msg& msg) override;