NodeSet* getLeftNeighbours(NodeSet &scanline,Node *v) {
NodeSet *leftv = new NodeSet;
NodeSet::iterator i=scanline.find(v);
- while(i--!=scanline.begin()) {
- Node *u=*(i);
+ while(i!=scanline.begin()) {
+ Node *u=*(--i);
if(u->r->overlapX(v->r)<=0) {
leftv->insert(u);
return leftv;
);
} else {
NodeSet::iterator it=scanline.find(v);
- if(it--!=scanline.begin()) {
- Node *u=*it;
+ if(it!=scanline.begin()) {
+ Node *u=*--it;
v->firstAbove=u;
u->firstBelow=v;
}
if(e->type==Open) {
scanline.insert(v);
NodeSet::iterator i=scanline.find(v);
- if(i--!=scanline.begin()) {
- Node *u=*i;
+ if(i!=scanline.begin()) {
+ Node *u=*--i;
v->firstAbove=u;
u->firstBelow=v;
}