cmListCommand: Replace remove duplicates loop with algorithm.
This commit is contained in:
parent
cebeed2486
commit
1c7c35c372
|
@ -418,24 +418,9 @@ bool cmListCommand
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string value;
|
varArgsExpanded.erase(cmRemoveDuplicates(varArgsExpanded),
|
||||||
|
varArgsExpanded.end());
|
||||||
|
std::string value = cmJoin(varArgsExpanded, ";");
|
||||||
std::set<std::string> unique;
|
|
||||||
std::vector<std::string>::iterator it;
|
|
||||||
const char* sep = "";
|
|
||||||
for ( it = varArgsExpanded.begin(); it != varArgsExpanded.end(); ++ it )
|
|
||||||
{
|
|
||||||
if (unique.find(*it) != unique.end())
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
unique.insert(*it);
|
|
||||||
value += sep;
|
|
||||||
value += it->c_str();
|
|
||||||
sep = ";";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
this->Makefile->AddDefinition(listName, value.c_str());
|
this->Makefile->AddDefinition(listName, value.c_str());
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue