for(typename ShapeArray::const_iterator i=shapes.begin(); i!=shapes.end(); ++i)
{
Coverage c = (*i)->get_coverage(bbox);
- if(i==shapes.begin() || Ops::shortcircuit(c>coverage))
+ if(i==shapes.begin())
coverage = c;
+ else
+ coverage = Ops::combine_coverage(coverage, c);
- if(coverage!=PARTIAL_COVERAGE && Ops::shortcircuit(coverage==FULL_COVERAGE))
+ if((coverage==NO_COVERAGE && Ops::shortcircuit(false)) || (coverage==FULL_COVERAGE && Ops::shortcircuit(true)))
break;
}