diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-02-15 17:02:56 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-02-15 17:57:23 (GMT) |
commit | 67a26764b536992a966cacab4811c2d30624405c (patch) | |
tree | bfc5bfa1226a4b86dde98a165c75e1726d51ac92 /Source/cmListCommand.cxx | |
parent | 1cecd3a53107f7f670cf011201c1da3a33b795b6 (diff) | |
download | CMake-67a26764b536992a966cacab4811c2d30624405c.zip CMake-67a26764b536992a966cacab4811c2d30624405c.tar.gz CMake-67a26764b536992a966cacab4811c2d30624405c.tar.bz2 |
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 ae13fdf..22d8b0e 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; |