- while (cit != deplist.end()) {
- if (suffixIs(cit->first, suf)) {
- // Can't erase the current iterator, but we can increment and then erase.
- // deplist is a map so only the erased iterator is invalidated.
+ DepList::iterator end = deplist.end();
+ while (cit != end) {
+ if (suffixIs(cit->first.absFilename(), suf)) {
+ // Can't erase the current iterator, but we
+ // can increment and then erase.
+ // Deplist is a map so only the erased
+ // iterator is invalidated.