am dc8f3c37: am 5a034089: Merge "opengles emulator: fix a bug in RangeList"

* commit 'dc8f3c37940a2f99c3cfba6a798c3c123faf7d90':
  opengles emulator: fix a bug in RangeList
This commit is contained in:
David Turner
2011-08-10 01:21:44 -07:00
committed by Android Git Automerger

View File

@@ -86,17 +86,17 @@ void RangeList::delRange(const Range& r,RangeList& deleted) {
erase(i);
i--;
if (intersection!=old) { // otherwise split:
//intersection on right side
if(old.getStart() != intersection.getStart()) {
list.insert(list.begin(),Range(old.getStart(),intersection.getStart() - old.getStart()));
}
//intersection on left side
if(old.getEnd() != intersection.getEnd()) {
list.insert(list.begin(),Range(intersection.getEnd(),old.getEnd() - intersection.getEnd()));
}
deleted.addRange(intersection);
//intersection on right side
if(old.getStart() != intersection.getStart()) {
list.insert(list.begin(),Range(old.getStart(),intersection.getStart() - old.getStart()));
}
//intersection on left side
if(old.getEnd() != intersection.getEnd()) {
list.insert(list.begin(),Range(intersection.getEnd(),old.getEnd() - intersection.getEnd()));
}
}
deleted.addRange(intersection);
}
}
}