mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-09 23:30:35 -06:00
cmListCommand: Implement REVERSE subcommand with std::reverse.
This commit is contained in:
@@ -410,15 +410,8 @@ bool cmListCommand
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string value;
|
||||
std::vector<std::string>::reverse_iterator it;
|
||||
const char* sep = "";
|
||||
for ( it = varArgsExpanded.rbegin(); it != varArgsExpanded.rend(); ++ it )
|
||||
{
|
||||
value += sep;
|
||||
value += it->c_str();
|
||||
sep = ";";
|
||||
}
|
||||
std::reverse(varArgsExpanded.begin(), varArgsExpanded.end());
|
||||
std::string value = cmJoin(varArgsExpanded, ";");
|
||||
|
||||
this->Makefile->AddDefinition(listName, value.c_str());
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user