Use LocaleSetter class in wxTextCtrl test case
Replace manual calls to setlocale() with the existing helper class. This makes the code slightly simpler and avoids -Wnoexcept-type warnings due to using setlocale as template argument as a welcome side effect.
This commit is contained in:
@@ -24,7 +24,6 @@
|
||||
#endif // WX_PRECOMP
|
||||
|
||||
#include "wx/scopedptr.h"
|
||||
#include "wx/scopeguard.h"
|
||||
#include "wx/uiaction.h"
|
||||
|
||||
#if wxUSE_CLIPBOARD
|
||||
@@ -290,8 +289,7 @@ void TextCtrlTestCase::StreamInput()
|
||||
#ifndef __WXOSX__
|
||||
{
|
||||
// Ensure we use decimal point and not a comma.
|
||||
char * const locOld = setlocale(LC_NUMERIC, "C");
|
||||
wxON_BLOCK_EXIT2( setlocale, (int)LC_NUMERIC, locOld );
|
||||
LocaleSetter setCLocale("C");
|
||||
|
||||
*m_text << "stringinput"
|
||||
<< 10
|
||||
|
Reference in New Issue
Block a user