diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-14 20:37:36 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2016-06-14 20:37:36 (GMT) |
commit | 24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c (patch) | |
tree | 8b14c406c768e3fe8a934e9ed9ba95a35b91cdaf /Source/CPack | |
parent | ab8b77dd33e9a13551af402b2cf7ee3aaa5486b8 (diff) | |
download | CMake-24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c.zip CMake-24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c.tar.gz CMake-24ab29b882548d9eceeb20d3ecbc5b9cc918bb7c.tar.bz2 |
Prefer istringstream and ostringstream over stringstream.
Use istringsream for parsing, ostringstream for generation.
Diffstat (limited to 'Source/CPack')
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWGenerator.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/IFW/cmCPackIFWPackage.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmCPackWIXGenerator.cxx | 12 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXAccessControlList.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXDirectoriesSourceWriter.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXFilesSourceWriter.cxx | 2 | ||||
-rw-r--r-- | Source/CPack/WiX/cmWIXPatchParser.cxx | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx index b47d46e..accba08 100644 --- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx +++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx @@ -567,7 +567,7 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository( void cmCPackIFWGenerator::WriteGeneratedByToStrim(cmXMLWriter& xout) { - std::stringstream comment; + std::ostringstream comment; comment << "Generated by CPack " << CMake_VERSION << " IFW generator " << "for QtIFW "; if (IsVersionLess("2.0")) { diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx index c44e389..405d668 100644 --- a/Source/CPack/IFW/cmCPackIFWPackage.cxx +++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx @@ -422,7 +422,7 @@ void cmCPackIFWPackage::GeneratePackageFile() } // Write dependencies if (!compDepSet.empty()) { - std::stringstream dependencies; + std::ostringstream dependencies; std::set<DependenceStruct>::iterator it = compDepSet.begin(); dependencies << it->NameWithCompare(); ++it; diff --git a/Source/CPack/WiX/cmCPackWIXGenerator.cxx b/Source/CPack/WiX/cmCPackWIXGenerator.cxx index 8777296..b5b364d 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 043cdff..bbbd92d 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 60ecae6..de64059 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 1341fa5..9a143cc 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 b750dcf..449a70b 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()); } |