From a77af8f1301b6a9964c187ffff7a1893a80fbe90 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sun, 15 Feb 2015 15:46:30 +0100 Subject: cmListCommand: Replace joining loop with cmJoin algorithm. --- Source/cmListCommand.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index 93c6d66..592681b 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -533,14 +533,8 @@ bool cmListCommand::HandleRemoveAtCommand( varArgsExpanded.erase(cmRemoveIndices(varArgsExpanded, removed), varArgsExpanded.end()); - std::string value; - const char* sep = ""; - for ( cc = 0; cc < varArgsExpanded.size(); ++ cc ) - { - value += sep; - value += varArgsExpanded[cc]; - sep = ";"; - } + std::string value = cmJoin(varArgsExpanded, ";"); + this->Makefile->AddDefinition(listName, value.c_str()); return true; -- cgit v0.12