diff options
Diffstat (limited to 'Source/cmLocale.h')
-rw-r--r-- | Source/cmLocale.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmLocale.h b/Source/cmLocale.h index 174f0f0..3580ec8 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -10,16 +10,18 @@ class cmLocaleRAII { - CM_DISABLE_COPY(cmLocaleRAII) - public: cmLocaleRAII() : OldLocale(setlocale(LC_CTYPE, nullptr)) { setlocale(LC_CTYPE, ""); } + ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); } + cmLocaleRAII(cmLocaleRAII const&) = delete; + cmLocaleRAII& operator=(cmLocaleRAII const&) = delete; + private: std::string OldLocale; }; |