mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-30 10:20:56 -06:00
cmGeneratedFileStream: Drop unused WriteRaw method
It has been superseded by `WriteAltEncoding`.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user