summaryrefslogtreecommitdiffstats
path: root/Source/cmLocale.h
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-04-21 19:46:58 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-04-21 19:46:58 (GMT)
commit44963b509b08b59081bbe3f0a55e806fa2c3152b (patch)
tree2d54ec5c5d2d8c47c2377fd30f92a7cb390366fd /Source/cmLocale.h
parent3f677f207653b33ff55d82e4d03653e146df3910 (diff)
downloadCMake-44963b509b08b59081bbe3f0a55e806fa2c3152b.zip
CMake-44963b509b08b59081bbe3f0a55e806fa2c3152b.tar.gz
CMake-44963b509b08b59081bbe3f0a55e806fa2c3152b.tar.bz2
cmLocaleRAII: make noncopyable
Diffstat (limited to 'Source/cmLocale.h')
-rw-r--r--Source/cmLocale.h8
1 files 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