diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-18 21:14:26 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-20 20:36:57 (GMT) |
commit | 416df93aa93d0a633f0e7354d0562934f676768b (patch) | |
tree | 11937ca00d29012dad0f84e5ab7b93ee374de257 | |
parent | 37b88d348a20921c835ce7aa99f6db62271503a7 (diff) | |
download | CMake-416df93aa93d0a633f0e7354d0562934f676768b.zip CMake-416df93aa93d0a633f0e7354d0562934f676768b.tar.gz CMake-416df93aa93d0a633f0e7354d0562934f676768b.tar.bz2 |
Convert some raw loops to cmWrap.
-rw-r--r-- | Source/cmComputeLinkDepends.cxx | 5 | ||||
-rw-r--r-- | Source/cmCoreTryCompile.cxx | 8 | ||||
-rw-r--r-- | Source/cmFindBase.cxx | 6 | ||||
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 14 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 8 |
5 files changed, 9 insertions, 32 deletions
diff --git a/Source/cmComputeLinkDepends.cxx b/Source/cmComputeLinkDepends.cxx index 8652690..be28b2f 100644 --- a/Source/cmComputeLinkDepends.cxx +++ b/Source/cmComputeLinkDepends.cxx @@ -705,10 +705,7 @@ void cmComputeLinkDepends::DisplayConstraintGraph() { EdgeList const& nl = this->EntryConstraintGraph[i]; e << "item " << i << " is [" << this->EntryList[i].Item << "]\n"; - for(EdgeList::const_iterator j = nl.begin(); j != nl.end(); ++j) - { - e << " item " << *j << " must follow it\n"; - } + e << cmWrap(" item ", nl, " must follow it", "\n") << "\n"; } fprintf(stderr, "%s\n", e.str().c_str()); } diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index bcd2d81..e9390e4 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -683,11 +683,9 @@ void cmCoreTryCompile::FindOutputFile(const std::string& targetName) std::ostringstream emsg; emsg << "Unable to find the executable at any of:\n"; - for (unsigned int i = 0; i < searchDirs.size(); ++i) - { - emsg << " " << this->BinaryDirectory << searchDirs[i] - << tmpOutputFile << "\n"; - } + emsg << cmWrap(" " + this->BinaryDirectory, + searchDirs, + tmpOutputFile, "\n") << "\n"; this->FindErrorMessage = emsg.str(); return; } diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx index fd3aa0b..6fe055a 100644 --- a/Source/cmFindBase.cxx +++ b/Source/cmFindBase.cxx @@ -355,11 +355,7 @@ void cmFindBase::PrintFindStuff() std::cerr << "SearchPathSuffixes "; std::cerr << cmJoin(this->SearchPathSuffixes, "\n") << "\n"; std::cerr << "SearchPaths\n"; - for(std::vector<std::string>::const_iterator i = this->SearchPaths.begin(); - i != this->SearchPaths.end(); ++i) - { - std::cerr << "[" << *i << "]\n"; - } + std::cerr << cmWrap("[", this->SearchPaths, "]", "\n") << "\n"; } bool cmFindBase::CheckForVariableInCache() diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index fd9b236..26bd4b9 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -329,10 +329,7 @@ bool cmFindPackageCommand { std::ostringstream e; e << "called with components that are both required and optional:\n"; - for(unsigned int i=0; i<doubledComponents.size(); ++i) - { - e << " " << doubledComponents[i] << "\n"; - } + e << cmWrap(" ", doubledComponents, "", "\n") << "\n"; this->SetError(e.str()); return false; } @@ -808,13 +805,8 @@ bool cmFindPackageCommand::HandlePackageMode() { e << "Could not find a package configuration file provided by \"" << this->Name << "\"" << requestedVersionString - << " with any of the following names:\n"; - for(std::vector<std::string>::const_iterator ci = - this->Configs.begin(); - ci != this->Configs.end(); ++ci) - { - e << " " << *ci << "\n"; - } + << " with any of the following names:\n" + << cmWrap(" ", this->Configs, "", "\n") << "\n"; } e << "Add the installation prefix of \"" << this->Name << "\" to " diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index 6fd569e..3c92fca 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -213,13 +213,7 @@ cmMakefile::~cmMakefile() void cmMakefile::PrintStringVector(const char* s, const std::vector<std::string>& v) const { - std::cout << s << ": ( \n"; - for(std::vector<std::string>::const_iterator i = v.begin(); - i != v.end(); ++i) - { - std::cout << *i << " "; - } - std::cout << " )\n"; + std::cout << s << ": ( \n" << cmWrap('"', v, '"', " ") << ")\n"; } void cmMakefile |