From f689011a65bd14e8ce59b5402db9e2f4232b8346 Mon Sep 17 00:00:00 2001 From: Simon Rozman Date: Mon, 19 Feb 2024 14:32:57 +0100 Subject: [PATCH] locale: use nullptr as default locale on Windows too Since stdex::locale_default is inline, it is initialized by the first module referencing it. Not necessarily compiled with the same _CONSOLE definition as other modules. This makes the default locale fluid. Signed-off-by: Simon Rozman --- include/stdex/locale.hpp | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/include/stdex/locale.hpp b/include/stdex/locale.hpp index 0c800060f..064a3b553 100644 --- a/include/stdex/locale.hpp +++ b/include/stdex/locale.hpp @@ -105,17 +105,7 @@ namespace stdex /// /// Reusable default charset locale /// - const inline locale locale_default( -#ifdef WIN32 -#ifdef _CONSOLE - create_locale(LC_ALL, ".OCP") -#else - create_locale(LC_ALL, ".ACP") -#endif -#else - nullptr -#endif - ); + const inline locale locale_default(nullptr); } #if defined(__GNUC__)