From c83c4c401e8c7cb51a7c7526634220e8e4a0b5f8 Mon Sep 17 00:00:00 2001 From: Andrey Chulkov Date: Thu, 7 May 2020 00:59:25 +0300 Subject: [PATCH] fix --- .../Dictionaries/PolygonDictionaryUtils.cpp | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/dbms/src/Dictionaries/PolygonDictionaryUtils.cpp b/dbms/src/Dictionaries/PolygonDictionaryUtils.cpp index 06ce4693bdb..4a88eb7c5bc 100644 --- a/dbms/src/Dictionaries/PolygonDictionaryUtils.cpp +++ b/dbms/src/Dictionaries/PolygonDictionaryUtils.cpp @@ -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; + return a.r.y() < b.r.y(); } 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; + return a.l.y() < b.l.y(); } 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 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;