Commit e3a66473 authored by gabime's avatar gabime

Small cleanup in set_formatter

parent 7704e413
...@@ -49,7 +49,8 @@ inline void spdlog::logger::set_formatter(std::unique_ptr<spdlog::formatter> f) ...@@ -49,7 +49,8 @@ inline void spdlog::logger::set_formatter(std::unique_ptr<spdlog::formatter> f)
inline void spdlog::logger::set_pattern(std::string pattern, pattern_time_type time_type) inline void spdlog::logger::set_pattern(std::string pattern, pattern_time_type time_type)
{ {
set_formatter(std::unique_ptr<spdlog::formatter>(new pattern_formatter(std::move(pattern), time_type))); auto new_formatter = spdlog::make_unique<spdlog::pattern_formatter>(std::move(pattern), time_type);
set_formatter(std::move(new_formatter));
} }
template<typename... Args> template<typename... Args>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment