]> git.saurik.com Git - wxWidgets.git/blobdiff - tests/testprec.h
revert previous revision about localization of decimal points in GetHumanReadableSize...
[wxWidgets.git] / tests / testprec.h
index b5178c8d1ed3e0453c7bb4506af0886ab63238eb..f7d0e66c5cfbe6cef51863d406bb8196df6a082b 100644 (file)
@@ -67,3 +67,15 @@ extern void SetFilterEventFunc(FilterEventFunc func);
 extern void SetProcessEventFunc(ProcessEventFunc func);
 
 extern bool IsNetworkAvailable();
 extern void SetProcessEventFunc(ProcessEventFunc func);
 
 extern bool IsNetworkAvailable();
+
+// helper class setting the locale to "C" for its lifetime
+class CLocaleSetter
+{
+public:
+    CLocaleSetter() : m_locOld(setlocale(LC_ALL, "C")) { }
+    ~CLocaleSetter() { setlocale(LC_ALL, m_locOld); }
+
+private:
+    const char * const m_locOld;
+    wxDECLARE_NO_COPY_CLASS(CLocaleSetter);
+};