summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-14 21:23:41 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-11 21:58:08 (GMT)
commit0ea719326ea78b423a5ec95b1218b626e9392f07 (patch)
treee1b2b51ea7f081734e1fbcfa0a9a778580453082
parent9380e85f865e29cd5968e91408a31d5160f4a4cb (diff)
downloadCMake-0ea719326ea78b423a5ec95b1218b626e9392f07.zip
CMake-0ea719326ea78b423a5ec95b1218b626e9392f07.tar.gz
CMake-0ea719326ea78b423a5ec95b1218b626e9392f07.tar.bz2
cmFindBase: Replace loop with cmJoin on range.
-rw-r--r--Source/cmFindBase.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmFindBase.cxx b/Source/cmFindBase.cxx
index 69991d5..6e55533 100644
--- a/Source/cmFindBase.cxx
+++ b/Source/cmFindBase.cxx
@@ -166,11 +166,9 @@ bool cmFindBase::ParseArguments(std::vector<std::string> const& argsIn)
}
else
{
- this->VariableDocumentation += "one of the " + this->Names[0];
- for (unsigned int j = 1; j < this->Names.size() - 1; ++j)
- {
- this->VariableDocumentation += ", " + this->Names[j];
- }
+ this->VariableDocumentation += "one of the ";
+ this->VariableDocumentation += cmJoin(cmRange(this->Names).retreat(1),
+ ", ");
this->VariableDocumentation += " or "
+ this->Names[this->Names.size() - 1] + " libraries be found";
}