summaryrefslogtreecommitdiff
path: root/Source/CPack/WiX
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-14 22:37:36 +0200
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-14 22:37:36 +0200
commit24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c (patch)
tree8b14c406c768e3fe8a934e9ed9ba95a35b91cdaf /Source/CPack/WiX
parentab8b77dd33e9a13551af402b2cf7ee3aaa5486b8 (diff)
downloadcmake-24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c.tar.gz
Prefer istringstream and ostringstream over stringstream.
Use istringsream for parsing, ostringstream for generation.
Diffstat (limited to 'Source/CPack/WiX')
-rw-r--r--Source/CPack/WiX/cmCPackWIXGenerator.cxx12
-rw-r--r--Source/CPack/WiX/cmWIXAccessControlList.cxx2
-rw-r--r--Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx2
-rw-r--r--Source/CPack/WiX/cmWIXFilesSourceWriter.cxx2
-rw-r--r--Source/CPack/WiX/cmWIXPatchParser.cxx2
5 files changed, 10 insertions, 10 deletions
diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
index 8777296e5a..b5b364d260 100644
--- a/Source/CPack/WiX/cmCPackWIXGenerator.cxx
+++ b/Source/CPack/WiX/cmCPackWIXGenerator.cxx
@@ -90,7 +90,7 @@ bool cmCPackWIXGenerator::RunCandleCommand(std::string const& sourceFile,
return false;
}
- std::stringstream command;
+ std::ostringstream command;
command << QuotePath(executable);
command << " -nologo";
command << " -arch " << GetArchitecture();
@@ -115,7 +115,7 @@ bool cmCPackWIXGenerator::RunLightCommand(std::string const& objectFiles)
return false;
}
- std::stringstream command;
+ std::ostringstream command;
command << QuotePath(executable);
command << " -nologo";
command << " -out " << QuotePath(packageFileNames.at(0));
@@ -254,7 +254,7 @@ bool cmCPackWIXGenerator::PackageFilesImpl()
std::set<std::string> usedBaseNames;
- std::stringstream objectFiles;
+ std::ostringstream objectFiles;
for (size_t i = 0; i < this->WixSources.size(); ++i) {
std::string const& sourceFilename = this->WixSources[i];
@@ -265,7 +265,7 @@ bool cmCPackWIXGenerator::PackageFilesImpl()
std::string uniqueBaseName = baseName;
while (usedBaseNames.find(uniqueBaseName) != usedBaseNames.end()) {
- std::stringstream tmp;
+ std::ostringstream tmp;
tmp << baseName << ++counter;
uniqueBaseName = tmp.str();
}
@@ -403,7 +403,7 @@ void cmCPackWIXGenerator::AddDefinition(cmWIXSourceWriter& source,
std::string const& name,
std::string const& value)
{
- std::stringstream tmp;
+ std::ostringstream tmp;
tmp << name << "=\"" << value << '"';
source.AddProcessingInstruction(
@@ -1019,7 +1019,7 @@ std::string cmCPackWIXGenerator::CreateNewIdForPath(std::string const& path)
idPrefix = "H";
}
- std::stringstream result;
+ std::ostringstream result;
result << idPrefix << "_" << identifier;
size_t ambiguityCount = ++IdAmbiguityCounter[identifier];
diff --git a/Source/CPack/WiX/cmWIXAccessControlList.cxx b/Source/CPack/WiX/cmWIXAccessControlList.cxx
index 043cdffb04..bbbd92d97e 100644
--- a/Source/CPack/WiX/cmWIXAccessControlList.cxx
+++ b/Source/CPack/WiX/cmWIXAccessControlList.cxx
@@ -127,7 +127,7 @@ void cmWIXAccessControlList::EmitBooleanAttribute(std::string const& entry,
std::string const& name)
{
if (!this->IsBooleanAttribute(name)) {
- std::stringstream message;
+ std::ostringstream message;
message << "Unknown boolean attribute '" << name << "'";
this->ReportError(entry, message.str());
}
diff --git a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
index 60ecae6ab5..de64059598 100644
--- a/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx
@@ -69,7 +69,7 @@ size_t cmWIXDirectoriesSourceWriter::BeginInstallationPrefixDirectory(
if (i == installRoot.size() - 1) {
AddAttribute("Id", "INSTALL_ROOT");
} else {
- std::stringstream tmp;
+ std::ostringstream tmp;
tmp << "INSTALL_PREFIX_" << i;
AddAttribute("Id", tmp.str());
}
diff --git a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
index 1341fa53d1..9a143cc044 100644
--- a/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
+++ b/Source/CPack/WiX/cmWIXFilesSourceWriter.cxx
@@ -31,7 +31,7 @@ void cmWIXFilesSourceWriter::EmitShortcut(std::string const& id,
std::string const& shortcutPrefix,
size_t shortcutIndex)
{
- std::stringstream shortcutId;
+ std::ostringstream shortcutId;
shortcutId << shortcutPrefix << id;
if (shortcutIndex > 0) {
diff --git a/Source/CPack/WiX/cmWIXPatchParser.cxx b/Source/CPack/WiX/cmWIXPatchParser.cxx
index b750dcf35a..449a70bde1 100644
--- a/Source/CPack/WiX/cmWIXPatchParser.cxx
+++ b/Source/CPack/WiX/cmWIXPatchParser.cxx
@@ -88,7 +88,7 @@ void cmWIXPatchParser::StartFragment(const char** attributes)
if (key == "Id") {
if (Fragments.find(value) != Fragments.end()) {
- std::stringstream tmp;
+ std::ostringstream tmp;
tmp << "Invalid reuse of 'CPackWixFragment' 'Id': " << value;
ReportValidationError(tmp.str());
}