summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocale.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmLocale.h b/Source/cmLocale.h
index e8e751d..cca7cf5 100644
--- a/Source/cmLocale.h
+++ b/Source/cmLocale.h
@@ -6,10 +6,11 @@
#include <cmConfigure.h>
#include <locale.h>
+#include <string>
class cmLocaleRAII
{
- const char* OldLocale;
+ std::string OldLocale;
public:
cmLocaleRAII()
@@ -17,7 +18,7 @@ public:
{
setlocale(LC_CTYPE, "");
}
- ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale); }
+ ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); }
};
#endif