This commit is contained in:
Andrey Chulkov 2020-05-07 00:59:25 +03:00
parent 147f3dae13
commit c83c4c401e

View File

@ -577,12 +577,7 @@ bool BucketsSinglePolygonIndex::Edge::compare1(const Edge & a, const Edge & b)
{
return a.r.x() < b.r.x();
}
if (a.r.y() != b.r.y())
{
return a.r.y() < b.r.y();
}
return true;
}
bool BucketsSinglePolygonIndex::Edge::compare2(const Edge & a, const Edge & b)
@ -602,12 +597,7 @@ bool BucketsSinglePolygonIndex::Edge::compare2(const Edge & a, const Edge & b)
{
return a.l.x() < b.l.x();
}
if (a.l.y() != b.l.y())
{
return a.l.y() < b.l.y();
}
return true;
}
bool BucketsSinglePolygonIndex::find(const Point & point) const
@ -626,10 +616,6 @@ bool BucketsSinglePolygonIndex::find(const Point & point) const
return false;
}
/** point is considired inside when ray down from point crosses odd number of edges */
std::vector<size_t> intersections;
intersections.reserve(10);
size_t pos = std::upper_bound(this->sorted_x.begin() + 1, this->sorted_x.end() - 1, x) - this->sorted_x.begin() - 1;
size_t cnt = 0;