From 7fe63d68188886d6c10fc4d6777ef54373cfedca Mon Sep 17 00:00:00 2001 From: gabime Date: Fri, 6 Dec 2024 15:21:18 +0200 Subject: [PATCH] Clean context --- src/spdlog.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/spdlog.cpp b/src/spdlog.cpp index e5994bde..b3cf0b3c 100644 --- a/src/spdlog.cpp +++ b/src/spdlog.cpp @@ -12,11 +12,12 @@ namespace spdlog { -#ifndef SPDLOG_DISABLE_GLOBAL_LOGGER + static std::shared_ptr s_context = +#ifndef SPDLOG_DISABLE_GLOBAL_LOGGER std::make_unique(std::make_unique("", std::make_unique())); #else -static std::shared_ptr s_context = std::make_unique(); + std::make_unique(); // empty context #endif void set_context(std::shared_ptr context) { s_context = std::move(context); }