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 <simon@rozman.si>
This commit is contained in:
Simon Rozman 2024-02-19 14:32:57 +01:00
parent 87d678f524
commit f689011a65

View File

@ -105,17 +105,7 @@ namespace stdex
/// ///
/// Reusable default charset locale /// Reusable default charset locale
/// ///
const inline locale locale_default( const inline locale locale_default(nullptr);
#ifdef WIN32
#ifdef _CONSOLE
create_locale(LC_ALL, ".OCP")
#else
create_locale(LC_ALL, ".ACP")
#endif
#else
nullptr
#endif
);
} }
#if defined(__GNUC__) #if defined(__GNUC__)