mirror of
https://github.com/gabime/spdlog.git
synced 2026-04-10 11:34:29 +08:00
Replaced details::make_unique with std::make_unique
This commit is contained in:
@@ -17,7 +17,7 @@ template<typename ConsoleMutex>
|
||||
SPDLOG_INLINE ansicolor_sink<ConsoleMutex>::ansicolor_sink(FILE *target_file, color_mode mode)
|
||||
: target_file_(target_file)
|
||||
, mutex_(ConsoleMutex::mutex())
|
||||
, formatter_(details::make_unique<spdlog::pattern_formatter>())
|
||||
, formatter_(std::make_unique<spdlog::pattern_formatter>())
|
||||
|
||||
{
|
||||
set_color_mode(mode);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
template<typename Mutex>
|
||||
SPDLOG_INLINE spdlog::sinks::base_sink<Mutex>::base_sink()
|
||||
: formatter_{details::make_unique<spdlog::pattern_formatter>()}
|
||||
: formatter_{std::make_unique<spdlog::pattern_formatter>()}
|
||||
{}
|
||||
|
||||
template<typename Mutex>
|
||||
@@ -53,7 +53,7 @@ void SPDLOG_INLINE spdlog::sinks::base_sink<Mutex>::set_formatter(std::unique_pt
|
||||
template<typename Mutex>
|
||||
void SPDLOG_INLINE spdlog::sinks::base_sink<Mutex>::set_pattern_(const std::string &pattern)
|
||||
{
|
||||
set_formatter_(details::make_unique<spdlog::pattern_formatter>(pattern));
|
||||
set_formatter_(std::make_unique<spdlog::pattern_formatter>(pattern));
|
||||
}
|
||||
|
||||
template<typename Mutex>
|
||||
|
||||
@@ -76,7 +76,7 @@ protected:
|
||||
|
||||
void set_pattern_(const std::string &pattern) override
|
||||
{
|
||||
set_formatter_(details::make_unique<spdlog::pattern_formatter>(pattern));
|
||||
set_formatter_(std::make_unique<spdlog::pattern_formatter>(pattern));
|
||||
}
|
||||
|
||||
void set_formatter_(std::unique_ptr<spdlog::formatter> sink_formatter) override
|
||||
|
||||
@@ -45,7 +45,7 @@ public:
|
||||
{
|
||||
try
|
||||
{
|
||||
client_ = spdlog::details::make_unique<mongocxx::client>(mongocxx::uri{uri});
|
||||
client_ = spdlog::std::make_unique<mongocxx::client>(mongocxx::uri{uri});
|
||||
}
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
|
||||
@@ -32,7 +32,7 @@ template<typename ConsoleMutex>
|
||||
SPDLOG_INLINE stdout_sink_base<ConsoleMutex>::stdout_sink_base(FILE *file)
|
||||
: mutex_(ConsoleMutex::mutex())
|
||||
, file_(file)
|
||||
, formatter_(details::make_unique<spdlog::pattern_formatter>())
|
||||
, formatter_(std::make_unique<spdlog::pattern_formatter>())
|
||||
{
|
||||
#ifdef _WIN32
|
||||
// get windows handle from the FILE* object
|
||||
|
||||
@@ -19,7 +19,7 @@ template<typename ConsoleMutex>
|
||||
SPDLOG_INLINE wincolor_sink<ConsoleMutex>::wincolor_sink(void *out_handle, color_mode mode)
|
||||
: out_handle_(out_handle)
|
||||
, mutex_(ConsoleMutex::mutex())
|
||||
, formatter_(details::make_unique<spdlog::pattern_formatter>())
|
||||
, formatter_(std::make_unique<spdlog::pattern_formatter>())
|
||||
{
|
||||
|
||||
set_color_mode_impl(mode);
|
||||
|
||||
Reference in New Issue
Block a user