diff --git a/bench/formatter-bench.cpp b/bench/formatter-bench.cpp index 34407c10..f2b84920 100644 --- a/bench/formatter-bench.cpp +++ b/bench/formatter-bench.cpp @@ -4,13 +4,13 @@ // #include "benchmark/benchmark.h" - #include "spdlog/spdlog.h" #include "spdlog/pattern_formatter.h" +#include void bench_formatter(benchmark::State &state, std::string pattern) { - auto formatter = spdlog::details::make_unique(pattern); + auto formatter = std::make_unique(pattern); spdlog::memory_buf_t dest; std::string logger_name = "logger-name"; const char *text = "Hello. This is some message with length of 80 "; diff --git a/example/example.cpp b/example/example.cpp index 5136eff5..5be28b43 100644 --- a/example/example.cpp +++ b/example/example.cpp @@ -275,7 +275,7 @@ public: void custom_flags_example() { - + auto formatter = std::make_unique(); formatter->add_flag('*').set_pattern("[%n] [%*] [%^%l%$] %v"); spdlog::set_formatter(std::move(formatter)); diff --git a/include/spdlog/sinks/dist_sink.h b/include/spdlog/sinks/dist_sink.h index 8fccb4ee..426d6fce 100644 --- a/include/spdlog/sinks/dist_sink.h +++ b/include/spdlog/sinks/dist_sink.h @@ -76,7 +76,7 @@ protected: void set_pattern_(const std::string &pattern) override { - set_formatter_(details::make_unique(pattern)); + set_formatter_(std::make_unique(pattern)); } void set_formatter_(std::unique_ptr sink_formatter) override diff --git a/tests/includes.h b/tests/includes.h index 7285873a..05edf162 100644 --- a/tests/includes.h +++ b/tests/includes.h @@ -11,6 +11,7 @@ #include #include #include +#include #include #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_DEBUG diff --git a/tests/test_pattern_formatter.cpp b/tests/test_pattern_formatter.cpp index 848398fd..4c54ea17 100644 --- a/tests/test_pattern_formatter.cpp +++ b/tests/test_pattern_formatter.cpp @@ -330,7 +330,7 @@ public: std::unique_ptr clone() const override { - return spdlog::details::make_unique(some_txt); + return std::make_unique(some_txt); } }; // test clone with custom flag formatters