diff options
Diffstat (limited to 'Source/cmListCommand.cxx')
-rw-r--r-- | Source/cmListCommand.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmListCommand.cxx b/Source/cmListCommand.cxx index b2acb90..9b63d24 100644 --- a/Source/cmListCommand.cxx +++ b/Source/cmListCommand.cxx @@ -152,7 +152,7 @@ bool cmListCommand::HandleLengthCommand(std::vector<std::string> const& args) } const std::string& listName = args[1]; - const std::string& variableName = args[args.size() - 1]; + const std::string& variableName = args.back(); std::vector<std::string> varArgsExpanded; // do not check the return value here // if the list var is not found varArgsExpanded will have size 0 @@ -174,7 +174,7 @@ bool cmListCommand::HandleGetCommand(std::vector<std::string> const& args) } const std::string& listName = args[1]; - const std::string& variableName = args[args.size() - 1]; + const std::string& variableName = args.back(); // expand the variable std::vector<std::string> varArgsExpanded; if (!this->GetList(varArgsExpanded, listName)) { @@ -243,7 +243,7 @@ bool cmListCommand::HandleFindCommand(std::vector<std::string> const& args) } const std::string& listName = args[1]; - const std::string& variableName = args[args.size() - 1]; + const std::string& variableName = args.back(); // expand the variable std::vector<std::string> varArgsExpanded; if (!this->GetList(varArgsExpanded, listName)) { @@ -1176,7 +1176,7 @@ bool cmListCommand::HandleSublistCommand(std::vector<std::string> const& args) } const std::string& listName = args[1]; - const std::string& variableName = args[args.size() - 1]; + const std::string& variableName = args.back(); // expand the variable std::vector<std::string> varArgsExpanded; |