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;