summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalVisualStudio10Generator.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/cmGlobalVisualStudio10Generator.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/cmGlobalVisualStudio10Generator.cxx')
-rw-r--r--Source/cmGlobalVisualStudio10Generator.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 4c4c62c..73a5dae 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -478,12 +478,11 @@ void cmGlobalVisualStudio10Generator::Generate()
void cmGlobalVisualStudio10Generator::EnableLanguage(
std::vector<std::string> const& lang, cmMakefile* mf, bool optional)
{
- for (std::vector<std::string>::const_iterator it = lang.begin();
- it != lang.end(); ++it) {
- if (*it == "ASM_NASM") {
+ for (std::string const& it : lang) {
+ if (it == "ASM_NASM") {
this->NasmEnabled = true;
}
- if (*it == "CUDA") {
+ if (it == "CUDA") {
this->CudaEnabled = true;
}
}
@@ -829,8 +828,9 @@ void cmGlobalVisualStudio10Generator::GenerateBuildCommand(
if (parser.ParseFile(slnFile, slnData,
cmVisualStudioSlnParser::DataGroupProjects)) {
std::vector<cmSlnProjectEntry> slnProjects = slnData.GetProjects();
- for (std::vector<cmSlnProjectEntry>::iterator i = slnProjects.begin();
- !useDevEnv && i != slnProjects.end(); ++i) {
+ for (std::vector<cmSlnProjectEntry>::const_iterator i =
+ slnProjects.cbegin();
+ !useDevEnv && i != slnProjects.cend(); ++i) {
std::string proj = i->GetRelativePath();
if (proj.size() > 7 && proj.substr(proj.size() - 7) == ".vfproj") {
useDevEnv = true;