summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutomoc.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2012-06-06 19:14:40 (GMT)
committerBrad King <brad.king@kitware.com>2012-06-12 19:40:24 (GMT)
commit94de98290230e010a28fcbf36c0f691b564fbc5c (patch)
treeac8a028499e5e09e6d3ad6b70325fb02c0881625 /Source/cmQtAutomoc.cxx
parenteb53bc27733e5762906eb251184df317f1c4664d (diff)
downloadCMake-94de98290230e010a28fcbf36c0f691b564fbc5c.zip
CMake-94de98290230e010a28fcbf36c0f691b564fbc5c.tar.gz
CMake-94de98290230e010a28fcbf36c0f691b564fbc5c.tar.bz2
Avoid direct use of std::(o|)stringstream (#13272)
Older C++ compilers do not provide a standard std::stringstream. Use our compatibility interfaces instead. Also avoid std::stringstream(openmode) signature. Our approximate stringstream implementation provided when the standard one is not available does not support the openmode argument.
Diffstat (limited to 'Source/cmQtAutomoc.cxx')
-rw-r--r--Source/cmQtAutomoc.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmQtAutomoc.cxx b/Source/cmQtAutomoc.cxx
index ca27530..113d678 100644
--- a/Source/cmQtAutomoc.cxx
+++ b/Source/cmQtAutomoc.cxx
@@ -18,6 +18,7 @@
#include "cmSystemTools.h"
#include <cmsys/Terminal.h>
+#include <cmsys/ios/sstream>
#include <string.h>
#if defined(__APPLE__)
@@ -549,7 +550,7 @@ bool cmQtAutomoc::RunAutomoc()
this->GenerateMoc(it->first, it->second);
}
- std::stringstream outStream(std::stringstream::out);
+ cmsys_ios::stringstream outStream;
outStream << "/* This file is autogenerated, do not edit*/\n";
bool automocCppChanged = false;
@@ -1077,7 +1078,7 @@ bool cmQtAutomoc::EndsWith(const std::string& str, const std::string& with)
std::string cmQtAutomoc::ReadAll(const std::string& filename)
{
std::ifstream file(filename.c_str());
- std::stringstream stream;
+ cmsys_ios::stringstream stream;
stream << file.rdbuf();
file.close();
return stream.str();