Convert some raw loops to cmWrap.

This commit is contained in:
Stephen Kelly 2015-02-18 22:14:26 +01:00
parent 37b88d348a
commit 416df93aa9
5 changed files with 9 additions and 32 deletions

View File

@ -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());
}

View File

@ -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;
}

View File

@ -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()

View File

@ -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 "

View File

@ -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