Replaced details::make_unique with std::make_unique

This commit is contained in:
gabime
2023-09-01 18:22:40 +03:00
parent 866744e40e
commit 19d4e60561
15 changed files with 64 additions and 80 deletions

View File

@@ -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);

View File

@@ -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>

View File

@@ -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

View File

@@ -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)
{

View File

@@ -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

View File

@@ -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);