summaryrefslogtreecommitdiffstats
path: root/Source/cmGetCMakePropertyCommand.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-01-14 20:31:46 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-02-11 21:57:55 (GMT)
commit8910224950a2b723e0d4fd7c21a326af7fb2e050 (patch)
tree09eb05962917fc5f205db31ae06b8c105813617e /Source/cmGetCMakePropertyCommand.cxx
parent7b8725bf8472ebf4781ddd60ef8fcca9c3ad98dd (diff)
downloadCMake-8910224950a2b723e0d4fd7c21a326af7fb2e050.zip
CMake-8910224950a2b723e0d4fd7c21a326af7fb2e050.tar.gz
CMake-8910224950a2b723e0d4fd7c21a326af7fb2e050.tar.bz2
Replace common loop pattern with cmJoin
Diffstat (limited to 'Source/cmGetCMakePropertyCommand.cxx')
-rw-r--r--Source/cmGetCMakePropertyCommand.cxx20
1 files changed, 2 insertions, 18 deletions
diff --git a/Source/cmGetCMakePropertyCommand.cxx b/Source/cmGetCMakePropertyCommand.cxx
index c0e4683..84c00ba 100644
--- a/Source/cmGetCMakePropertyCommand.cxx
+++ b/Source/cmGetCMakePropertyCommand.cxx
@@ -34,15 +34,7 @@ bool cmGetCMakePropertyCommand
std::vector<std::string> vars = this->Makefile->GetDefinitions(cacheonly);
if (!vars.empty())
{
- output = "";
- const char* sep = "";
- std::vector<std::string>::size_type cc;
- for ( cc = 0; cc < vars.size(); ++cc )
- {
- output += sep;
- output += vars[cc];
- sep = ";";
- }
+ output = cmJoin(vars, ";");
}
}
else if ( args[1] == "MACROS" )
@@ -54,15 +46,7 @@ bool cmGetCMakePropertyCommand
const std::set<std::string>* components
= this->Makefile->GetLocalGenerator()->GetGlobalGenerator()
->GetInstallComponents();
- std::set<std::string>::const_iterator compIt;
- output = "";
- const char* sep = "";
- for (compIt = components->begin(); compIt != components->end(); ++compIt)
- {
- output += sep;
- output += *compIt;
- sep = ";";
- }
+ output = cmJoin(*components, ";");
}
else
{