diff options
Diffstat (limited to 'Source/cmComputeTargetDepends.cxx')
-rw-r--r-- | Source/cmComputeTargetDepends.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/cmComputeTargetDepends.cxx b/Source/cmComputeTargetDepends.cxx index 9b7b02f..01d4c07 100644 --- a/Source/cmComputeTargetDepends.cxx +++ b/Source/cmComputeTargetDepends.cxx @@ -11,6 +11,7 @@ #include "cmMakefile.h" #include "cmMessageType.h" #include "cmPolicies.h" +#include "cmRange.h" #include "cmSourceFile.h" #include "cmState.h" #include "cmStateTypes.h" @@ -549,10 +550,9 @@ bool cmComputeTargetDepends::ComputeFinalDepends( int head = -1; std::set<int> emitted; NodeList const& nl = components[c]; - for (NodeList::const_reverse_iterator ni = nl.rbegin(); ni != nl.rend(); - ++ni) { + for (int ni : cmReverseRange(nl)) { std::set<int> visited; - if (!this->IntraComponent(cmap, c, *ni, &head, emitted, visited)) { + if (!this->IntraComponent(cmap, c, ni, &head, emitted, visited)) { // Cycle in add_dependencies within component! this->ComplainAboutBadComponent(ccg, c, true); return false; |