Remove unneeded check

This commit is contained in:
Bertold Van den Bergh 2019-08-14 14:54:07 +02:00
parent 1cc05dbac3
commit a6188bb59f

View file

@ -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;