diff options
author | Brad King <brad.king@kitware.com> | 2022-10-29 00:22:46 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-10-30 12:31:35 (GMT) |
commit | a0d4e3bf347a1d995d064de19e14b71b87cbeeda (patch) | |
tree | e9d0b30ba5eca5e6e3ccc8815a24fadea2a51b74 | |
parent | 2e5af30ce0181b6652fb6f3a90d2292b065dee8d (diff) | |
download | CMake-a0d4e3bf347a1d995d064de19e14b71b87cbeeda.zip CMake-a0d4e3bf347a1d995d064de19e14b71b87cbeeda.tar.gz CMake-a0d4e3bf347a1d995d064de19e14b71b87cbeeda.tar.bz2 |
cmGeneratedFileStream: Drop unused WriteRaw method
It has been superseded by `WriteAltEncoding`.
-rw-r--r-- | Source/cmGeneratedFileStream.cxx | 14 | ||||
-rw-r--r-- | Source/cmGeneratedFileStream.h | 10 |
2 files changed, 1 insertions, 23 deletions
diff --git a/Source/cmGeneratedFileStream.cxx b/Source/cmGeneratedFileStream.cxx index 215c3c2..c72d6a7 100644 --- a/Source/cmGeneratedFileStream.cxx +++ b/Source/cmGeneratedFileStream.cxx @@ -14,11 +14,10 @@ #endif cmGeneratedFileStream::cmGeneratedFileStream(Encoding encoding) - : OriginalLocale(this->getloc()) { #ifndef CMAKE_BOOTSTRAP if (encoding != codecvt::None) { - this->imbue(std::locale(this->OriginalLocale, new codecvt(encoding))); + this->imbue(std::locale(this->getloc(), new codecvt(encoding))); } #else static_cast<void>(encoding); @@ -252,14 +251,3 @@ void cmGeneratedFileStream::WriteAltEncoding(std::string const& data, this->write(data.data(), data.size()); #endif } - -void cmGeneratedFileStream::WriteRaw(std::string const& data) -{ -#ifndef CMAKE_BOOTSTRAP - std::locale activeLocale = this->imbue(this->OriginalLocale); - this->write(data.data(), data.size()); - this->imbue(activeLocale); -#else - this->write(data.data(), data.size()); -#endif -} diff --git a/Source/cmGeneratedFileStream.h b/Source/cmGeneratedFileStream.h index 77fd7ef..bfc121f 100644 --- a/Source/cmGeneratedFileStream.h +++ b/Source/cmGeneratedFileStream.h @@ -152,14 +152,4 @@ public: * Afterward, the original encoding is restored. */ void WriteAltEncoding(std::string const& data, Encoding encoding); - - /** - * Writes the given string directly to the file without changing the - * encoding. - */ - void WriteRaw(std::string const& data); - -private: - // The original locale of the stream (performs no encoding conversion). - std::locale OriginalLocale; }; |