summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio11Generator.cxx
diff options
context:
space:
mode:
authorVitaly Stakhovsky <vvs31415@gitlab.org>2017-12-21 16:51:28 (GMT)
committerBrad King <brad.king@kitware.com>2017-12-21 19:52:49 (GMT)
commit92c7b5260795153f4152e8562a7abac3d6d77d8a (patch)
tree1b058a2162fd352df824a8c470f5c4b222531f71 /Source/cmGlobalVisualStudio11Generator.cxx
parent258e6f1b1e1d20bc48a5892f5d9d339269fa2704 (diff)
downloadCMake-92c7b5260795153f4152e8562a7abac3d6d77d8a.zip
CMake-92c7b5260795153f4152e8562a7abac3d6d77d8a.tar.gz
CMake-92c7b5260795153f4152e8562a7abac3d6d77d8a.tar.bz2
VS: Use range-based 'for' loops in generator code
Use `auto` for complex types.
Diffstat (limited to 'Source/cmGlobalVisualStudio11Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio11Generator.cxx14
1 files changed, 6 insertions, 8 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx
index cb3b047..f1d5a8c 100644
--- a/Source/cmGlobalVisualStudio11Generator.cxx
+++ b/Source/cmGlobalVisualStudio11Generator.cxx
@@ -83,9 +83,8 @@ public:
std::set<std::string> installedSDKs =
cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs();
- for (std::set<std::string>::const_iterator i = installedSDKs.begin();
- i != installedSDKs.end(); ++i) {
- names.push_back(std::string(vs11generatorName) + " " + *i);
+ for (std::string const& i : installedSDKs) {
+ names.push_back(std::string(vs11generatorName) + " " + i);
}
}
@@ -224,18 +223,17 @@ cmGlobalVisualStudio11Generator::GetInstalledWindowsCESDKs()
cmSystemTools::KeyWOW64_32);
std::set<std::string> ret;
- for (std::vector<std::string>::const_iterator i = subkeys.begin();
- i != subkeys.end(); ++i) {
+ for (std::string const& i : subkeys) {
std::string key = sdksKey;
key += '\\';
- key += *i;
+ key += i;
key += ';';
std::string path;
- if (cmSystemTools::ReadRegistryValue(key.c_str(), path,
+ if (cmSystemTools::ReadRegistryValue(key, path,
cmSystemTools::KeyWOW64_32) &&
!path.empty()) {
- ret.insert(*i);
+ ret.insert(i);
}
}