From 44963b509b08b59081bbe3f0a55e806fa2c3152b Mon Sep 17 00:00:00 2001 From: Daniel Pfeifer Date: Fri, 21 Apr 2017 21:46:58 +0200 Subject: cmLocaleRAII: make noncopyable --- Source/cmLocale.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Source/cmLocale.h b/Source/cmLocale.h index b98009f..086f448 100644 --- a/Source/cmLocale.h +++ b/Source/cmLocale.h @@ -10,8 +10,6 @@ class cmLocaleRAII { - std::string OldLocale; - public: cmLocaleRAII() : OldLocale(setlocale(LC_CTYPE, CM_NULLPTR)) @@ -19,6 +17,12 @@ public: setlocale(LC_CTYPE, ""); } ~cmLocaleRAII() { setlocale(LC_CTYPE, this->OldLocale.c_str()); } + +private: + cmLocaleRAII(cmLocaleRAII const&); + cmLocaleRAII& operator=(cmLocaleRAII const&); + + std::string OldLocale; }; #endif -- cgit v0.12