diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-09 16:00:00 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-10 18:25:56 (GMT) |
commit | cbbca9ee2aba6fa08a3931c69fde92b7b9b273c0 (patch) | |
tree | 2992d92119f90efc636e8cd8a32af0e30c25b9c7 /Source | |
parent | 9296cd0551ed16d926b7c59c41dabd0097ce89c8 (diff) | |
download | CMake-cbbca9ee2aba6fa08a3931c69fde92b7b9b273c0.zip CMake-cbbca9ee2aba6fa08a3931c69fde92b7b9b273c0.tar.gz CMake-cbbca9ee2aba6fa08a3931c69fde92b7b9b273c0.tar.bz2 |
Convert more loops to range-based for-loops
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 6 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 5 |
2 files changed, 5 insertions, 6 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index cf6802d..a7799b6 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2914,11 +2914,11 @@ void cmLocalGenerator::JoinDefines(const std::set<std::string>& defines, // command line without any escapes. However we still have to // get the '$' and '#' characters through WMake as '$$' and // '$#'. - for (const char* c = define.c_str(); *c; ++c) { - if (*c == '$' || *c == '#') { + for (char c : define) { + if (c == '$' || c == '#') { def += '$'; } - def += *c; + def += c; } } else { // Make the definition appear properly on the command line. Use diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 0572e07..74219b5 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1510,10 +1510,9 @@ cmLocalVisualStudio7GeneratorFCInfo::cmLocalVisualStudio7GeneratorFCInfo( if (const char* deps = sf.GetProperty("OBJECT_DEPENDS")) { std::vector<std::string> depends = cmExpandedList(deps); const char* sep = ""; - for (std::vector<std::string>::iterator j = depends.begin(); - j != depends.end(); ++j) { + for (const std::string& d : depends) { fc.AdditionalDeps += sep; - fc.AdditionalDeps += lg->ConvertToXMLOutputPath(*j); + fc.AdditionalDeps += lg->ConvertToXMLOutputPath(d); sep = ";"; needfc = true; } |