From 92d24e62d5e7c9605b413f3a806b44ce36618db0 Mon Sep 17 00:00:00 2001 From: Bertold Van den Bergh Date: Wed, 14 Aug 2019 14:54:07 +0200 Subject: [PATCH] Remove unneeded check --- library/zonedetect.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/library/zonedetect.c b/library/zonedetect.c index 5fb17d4..2ed867a 100644 --- a/library/zonedetect.c +++ b/library/zonedetect.c @@ -895,10 +895,6 @@ ZoneDetectResult *ZDLookup(const ZoneDetect *library, float lat, float lon, floa lonFixedPoint >= minLon && lonFixedPoint <= maxLon) { - /* Indices valid? */ - if(library->metadataOffset + metadataIndex >= library->dataOffset) continue; - if(library->dataOffset + polygonIndex >= (uint32_t)library->length) continue; - const ZDLookupResult lookupResult = ZDPointInPolygon(library, library->dataOffset + polygonIndex, latFixedPoint, lonFixedPoint, (safezone) ? &distanceSqrMin : NULL); if(lookupResult == ZD_LOOKUP_PARSE_ERROR) { break;