summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-08 20:29:15 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-06-08 21:08:40 (GMT)
commit9f25fc4dbb0fa3c027beb46c03c8b18507811cab (patch)
tree78be2312ef8b8597bba8f66512ede5baf7ddbc3f /Source
parentf9cc43ea37d8b4e2a482cb9004cec2bd8f824857 (diff)
downloadCMake-9f25fc4dbb0fa3c027beb46c03c8b18507811cab.zip
CMake-9f25fc4dbb0fa3c027beb46c03c8b18507811cab.tar.gz
CMake-9f25fc4dbb0fa3c027beb46c03c8b18507811cab.tar.bz2
Prefer std::ostream& over derivatives as parameters
Diffstat (limited to 'Source')
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx8
-rw-r--r--Source/CPack/cmCPackNSISGenerator.h6
-rw-r--r--Source/CTest/cmCTestBatchTestHandler.cxx4
-rw-r--r--Source/CTest/cmCTestBatchTestHandler.h4
-rw-r--r--Source/cmTarget.cxx3
-rw-r--r--Source/cmTarget.h2
6 files changed, 13 insertions, 14 deletions
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 9fa588d..5123edd 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -516,8 +516,8 @@ int cmCPackNSISGenerator::InitializeInternal()
return this->Superclass::InitializeInternal();
}
-void cmCPackNSISGenerator::CreateMenuLinks(std::ostringstream& str,
- std::ostringstream& deleteStr)
+void cmCPackNSISGenerator::CreateMenuLinks(std::ostream& str,
+ std::ostream& deleteStr)
{
const char* cpackMenuLinks = this->GetOption("CPACK_NSIS_MENU_LINKS");
if (!cpackMenuLinks) {
@@ -621,7 +621,7 @@ bool cmCPackNSISGenerator::SupportsComponentInstallation() const
}
std::string cmCPackNSISGenerator::CreateComponentDescription(
- cmCPackComponent* component, std::ostringstream& macrosOut)
+ cmCPackComponent* component, std::ostream& macrosOut)
{
// Basic description of the component
std::string componentCode = "Section ";
@@ -873,7 +873,7 @@ std::string cmCPackNSISGenerator::CreateDeselectionDependenciesDescription(
}
std::string cmCPackNSISGenerator::CreateComponentGroupDescription(
- cmCPackComponentGroup* group, std::ostringstream& macrosOut)
+ cmCPackComponentGroup* group, std::ostream& macrosOut)
{
if (group->Components.empty() && group->Subgroups.empty()) {
// Silently skip empty groups. NSIS doesn't support them.
diff --git a/Source/CPack/cmCPackNSISGenerator.h b/Source/CPack/cmCPackNSISGenerator.h
index fa52902..ae3ccca 100644
--- a/Source/CPack/cmCPackNSISGenerator.h
+++ b/Source/CPack/cmCPackNSISGenerator.h
@@ -40,7 +40,7 @@ public:
protected:
virtual int InitializeInternal();
- void CreateMenuLinks(std::ostringstream& str, std::ostringstream& deleteStr);
+ void CreateMenuLinks(std::ostream& str, std::ostream& deleteStr);
int PackageFiles();
virtual const char* GetOutputExtension() { return ".exe"; }
virtual const char* GetOutputPostfix() { return "win32"; }
@@ -56,7 +56,7 @@ protected:
/// particular component. Any added macros will be emitted via
/// macrosOut.
std::string CreateComponentDescription(cmCPackComponent* component,
- std::ostringstream& macrosOut);
+ std::ostream& macrosOut);
/// Produce NSIS code that selects all of the components that this component
/// depends on, recursively.
@@ -72,7 +72,7 @@ protected:
/// particular component group, including its components. Any
/// added macros will be emitted via macrosOut.
std::string CreateComponentGroupDescription(cmCPackComponentGroup* group,
- std::ostringstream& macrosOut);
+ std::ostream& macrosOut);
/// Translations any newlines found in the string into \\r\\n, so that the
/// resulting string can be used within NSIS.
diff --git a/Source/CTest/cmCTestBatchTestHandler.cxx b/Source/CTest/cmCTestBatchTestHandler.cxx
index 386c8d5..70f84cb 100644
--- a/Source/CTest/cmCTestBatchTestHandler.cxx
+++ b/Source/CTest/cmCTestBatchTestHandler.cxx
@@ -45,7 +45,7 @@ void cmCTestBatchTestHandler::WriteBatchScript()
fout.close();
}
-void cmCTestBatchTestHandler::WriteSrunArgs(int test, cmsys::ofstream& fout)
+void cmCTestBatchTestHandler::WriteSrunArgs(int test, std::ostream& fout)
{
cmCTestTestHandler::cmCTestTestProperties* properties =
this->Properties[test];
@@ -73,7 +73,7 @@ void cmCTestBatchTestHandler::WriteSrunArgs(int test, cmsys::ofstream& fout)
}
}
-void cmCTestBatchTestHandler::WriteTestCommand(int test, cmsys::ofstream& fout)
+void cmCTestBatchTestHandler::WriteTestCommand(int test, std::ostream& fout)
{
std::vector<std::string> args = this->Properties[test]->Args;
std::vector<std::string> processArgs;
diff --git a/Source/CTest/cmCTestBatchTestHandler.h b/Source/CTest/cmCTestBatchTestHandler.h
index 7a2a4a2..ed60ea3 100644
--- a/Source/CTest/cmCTestBatchTestHandler.h
+++ b/Source/CTest/cmCTestBatchTestHandler.h
@@ -33,8 +33,8 @@ public:
protected:
void WriteBatchScript();
- void WriteSrunArgs(int test, cmsys::ofstream& fout);
- void WriteTestCommand(int test, cmsys::ofstream& fout);
+ void WriteSrunArgs(int test, std::ostream& fout);
+ void WriteTestCommand(int test, std::ostream& fout);
void SubmitBatchScript();
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index f435a1d..da2a649 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -580,8 +580,7 @@ bool cmTarget::PushTLLCommandTrace(TLLSignature signature,
return ret;
}
-void cmTarget::GetTllSignatureTraces(std::ostringstream& s,
- TLLSignature sig) const
+void cmTarget::GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const
{
const char* sigString =
(sig == cmTarget::KeywordTLLSignature ? "keyword" : "plain");
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 71ba0cd..f91e5c6 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -156,7 +156,7 @@ public:
};
bool PushTLLCommandTrace(TLLSignature signature,
cmListFileContext const& lfc);
- void GetTllSignatureTraces(std::ostringstream& s, TLLSignature sig) const;
+ void GetTllSignatureTraces(std::ostream& s, TLLSignature sig) const;
void MergeLinkLibraries(cmMakefile& mf, const std::string& selfname,
const LinkLibraryVectorType& libs);