HomeWildfire Games

Fix incorrect use of setlocale() in cppformat CStr tests following rP22378

Description

Fix incorrect use of setlocale() in cppformat CStr tests following rP22378

Reported By: elexis

Differential Revision: https://code.wildfiregames.com/D2013

Event Timeline

From Jenkins:

gcc: make
==== Building test (debug) ====

test_CStr.cpp
In file included from ../../../source/ps/tests/test_CStr.cpp:16:0:
/zpool0/gcc6/source/ps/tests/test_CStr.h: In member function 'void TestCStr::test_parse()':
/zpool0/gcc6/source/ps/tests/test_CStr.h:117:41: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

   ScopedLocale(LC_NUMERIC, "en_US.UTF-8");

                                         ^
test_cppformat.cpp
In file included from ../../../source/ps/tests/test_cppformat.cpp:17:0:
/zpool0/gcc6/source/ps/tests/test_cppformat.h: In member function 'void TestCppformat::test_basic()':
/zpool0/gcc6/source/ps/tests/test_cppformat.h:29:37: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]

   ScopedLocale(LC_ALL, "en_US.UTF-8");
                                     ^