Skip to content

Commit

Permalink
Iterator decrementation be gone!
Browse files Browse the repository at this point in the history
  • Loading branch information
Lanny committed Apr 1, 2015
1 parent 35574e2 commit ccb2a70
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Segmentation/SeededRegionGrower.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,14 @@ bool Region::IsMember(DICOMImage::IndexType idx) {

void SeededRegionGrower::FilterTouched(
IndexSet &touched, IndexList *idx_list) {
for (IndexList::iterator it=idx_list->begin(); it!=idx_list->end(); it++) {
IndexList::iterator it=idx_list->begin();
while (it != idx_list->end()) {
if (touched.count(*it)) {
it = idx_list->erase(it);
it--;
continue;
}

it++;
}
}

Expand Down

0 comments on commit ccb2a70

Please sign in to comment.