diff options
author | Artur Ryt <artur.ryt@gmail.com> | 2019-02-07 21:39:05 (GMT) |
---|---|---|
committer | Artur Ryt <artur.ryt@gmail.com> | 2019-02-07 21:39:05 (GMT) |
commit | 01b2d6ab7465e7f22fb821876027df86b0c8f363 (patch) | |
tree | 7ae313670e3655269ef7f9db6feabdc4bb2aaf25 /Source/cmLocalNinjaGenerator.cxx | |
parent | 15bdbec0176e3aa620bb5bda3631819c5ca18eaf (diff) | |
download | CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.zip CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.tar.gz CMake-01b2d6ab7465e7f22fb821876027df86b0c8f363.tar.bz2 |
Modernize: Use ranged for-loops when possible
Replaced most manual `const_iterator`-based loops and some
reverse-iterator loops with range loops.
Fixes: #18858
Diffstat (limited to 'Source/cmLocalNinjaGenerator.cxx')
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index c0afc25..4dc04d5 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -466,10 +466,12 @@ void cmLocalNinjaGenerator::WriteCustomCommandBuildStatement( cmNinjaDeps ninjaOutputs(outputs.size() + byproducts.size()), ninjaDeps; bool symbolic = false; - for (std::vector<std::string>::const_iterator o = outputs.begin(); - !symbolic && o != outputs.end(); ++o) { - if (cmSourceFile* sf = this->Makefile->GetSource(*o)) { + for (std::string const& output : outputs) { + if (cmSourceFile* sf = this->Makefile->GetSource(output)) { symbolic = sf->GetPropertyAsBool("SYMBOLIC"); + if (symbolic) { + break; + } } } |