diff options
author | Brad King <brad.king@kitware.com> | 2017-12-21 12:57:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-12-21 12:57:30 (GMT) |
commit | 1edfb2c47a2a48e111d7f060184c3e618a712ea4 (patch) | |
tree | 8bbae8fa0bedf01ca22e64117c3ee2010a4a278d | |
parent | 08d574e9d7b17971468aa0399d950edb147b57ca (diff) | |
parent | 8ef14467e4622f8f923f2a05a90c8fa0e12f76f9 (diff) | |
download | CMake-1edfb2c47a2a48e111d7f060184c3e618a712ea4.zip CMake-1edfb2c47a2a48e111d7f060184c3e618a712ea4.tar.gz CMake-1edfb2c47a2a48e111d7f060184c3e618a712ea4.tar.bz2 |
Merge topic 'solaris_warning_single'
8ef14467 Solaris: Fix shadowed declaration warning
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1611
-rw-r--r-- | Source/cmParseArgumentsCommand.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/Source/cmParseArgumentsCommand.cxx b/Source/cmParseArgumentsCommand.cxx index 0922e6e..9a5b097 100644 --- a/Source/cmParseArgumentsCommand.cxx +++ b/Source/cmParseArgumentsCommand.cxx @@ -71,8 +71,8 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, typedef std::map<std::string, std::string> single_map; typedef std::map<std::string, std::vector<std::string>> multi_map; options_map options; - single_map single; - multi_map multi; + single_map singleValArgs; + multi_map multiValArgs; // anything else is put into a vector of unparsed strings std::vector<std::string> unparsed; @@ -98,7 +98,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, if (!used_keywords.insert(iter).second) { this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); } - single[iter]; // default initialize + singleValArgs[iter]; // default initialize } // the fourth argument is a (cmake) list of multi argument options @@ -108,7 +108,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, if (!used_keywords.insert(iter).second) { this->GetMakefile()->IssueMessage(cmake::WARNING, dup_warning + iter); } - multi[iter]; // default initialize + multiValArgs[iter]; // default initialize } enum insideValues @@ -161,15 +161,15 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, continue; } - const single_map::iterator singleIter = single.find(arg); - if (singleIter != single.end()) { + const single_map::iterator singleIter = singleValArgs.find(arg); + if (singleIter != singleValArgs.end()) { insideValues = SINGLE; currentArgName = arg; continue; } - const multi_map::iterator multiIter = multi.find(arg); - if (multiIter != multi.end()) { + const multi_map::iterator multiIter = multiValArgs.find(arg); + if (multiIter != multiValArgs.end()) { insideValues = MULTI; currentArgName = arg; continue; @@ -177,14 +177,14 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, switch (insideValues) { case SINGLE: - single[currentArgName] = arg; + singleValArgs[currentArgName] = arg; insideValues = NONE; break; case MULTI: if (parseFromArgV) { - multi[currentArgName].push_back(escape_arg(arg)); + multiValArgs[currentArgName].push_back(escape_arg(arg)); } else { - multi[currentArgName].push_back(arg); + multiValArgs[currentArgName].push_back(arg); } break; default: @@ -204,7 +204,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, this->Makefile->AddDefinition(prefix + iter.first, iter.second ? "TRUE" : "FALSE"); } - for (auto const& iter : single) { + for (auto const& iter : singleValArgs) { if (!iter.second.empty()) { this->Makefile->AddDefinition(prefix + iter.first, iter.second.c_str()); } else { @@ -212,7 +212,7 @@ bool cmParseArgumentsCommand::InitialPass(std::vector<std::string> const& args, } } - for (auto const& iter : multi) { + for (auto const& iter : multiValArgs) { if (!iter.second.empty()) { this->Makefile->AddDefinition( prefix + iter.first, cmJoin(cmMakeRange(iter.second), ";").c_str()); |