mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-07 04:02:23 +03:00
cmLocaleRAII: make noncopyable
This commit is contained in:
1 parent
3f677f2076
commit
44963b509b
1 file changed
+6
-2
+6
-2
@@ -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
|
||||
Reference in new issue
Block a user