diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-15 18:02:56 +0100 |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-15 18:57:23 +0100 |
commit | 67a26764b536992a966cacab4811c2d30624405c (patch) | |
tree | bfc5bfa1226a4b86dde98a165c75e1726d51ac92 /Source/cmListCommand.cxx | |
parent | 1cecd3a53107f7f670cf011201c1da3a33b795b6 (diff) | |
download | cmake-67a26764b536992a966cacab4811c2d30624405c.tar.gz |
cmListCommand: Implement REVERSE subcommand with std::reverse.
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r-- | Source/cmListCommand.cxx | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index ae13fdf987..22d8b0e98f 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -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; |