From 189f3e7aba0c6bb27b9d9e4cf46930164b3fd0ca Mon Sep 17 00:00:00 2001 From: lively-michael <135886546+lively-michael@users.noreply.github.com> Date: Thu, 7 Nov 2024 18:10:41 -0700 Subject: [PATCH] Change `auto` to explicit type declarations This change is necessary to build as a dependency of ACEtk on Windows with MSVC19. --- src/tools/Log.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/tools/Log.hpp b/src/tools/Log.hpp index 521f0d2..cbe861d 100644 --- a/src/tools/Log.hpp +++ b/src/tools/Log.hpp @@ -16,9 +16,9 @@ namespace tools { */ class Log { - static auto initialize_logger() { + static static std::shared_ptr initialize_logger() { - auto instance = spdlog::stdout_color_st( "njoy" ); + static std::shared_ptr instance = spdlog::stdout_color_st( "njoy" ); instance->set_pattern( "[%^%l%$] %v" ); #ifndef NDEBUG instance->set_level( spdlog::level::debug ); @@ -26,9 +26,9 @@ class Log { return instance; } - static auto& logger() { + static static std::shared_ptr& logger() { - static auto instance = initialize_logger(); + static static std::shared_ptr instance = initialize_logger(); return instance; }