cmLocaleRAII: make noncopyable

This commit is contained in:
Daniel Pfeifer
2017-04-21 21:46:58 +02:00
parent 3f677f2076
commit 44963b509b

View File

@@ -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