From d20c3ee78286205b4aefbcbddf5648dc749d4bb6 Mon Sep 17 00:00:00 2001 From: Martin Davis Date: Thu, 23 May 2024 21:16:46 -0700 Subject: [PATCH] change to using auto in Coverage classes --- src/coverage/CoveragePolygon.cpp | 2 +- src/coverage/CoveragePolygonValidator.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/coverage/CoveragePolygon.cpp b/src/coverage/CoveragePolygon.cpp index 46ee29c7cf..70ba4684f7 100644 --- a/src/coverage/CoveragePolygon.cpp +++ b/src/coverage/CoveragePolygon.cpp @@ -56,7 +56,7 @@ CoveragePolygon::contains(const CoordinateXY& p) const { if (! intersectsEnv(p)) return false; - IndexedPointInAreaLocator& pia = getLocator(); + auto& pia = getLocator(); return Location::INTERIOR == pia.locate(&p); } diff --git a/src/coverage/CoveragePolygonValidator.cpp b/src/coverage/CoveragePolygonValidator.cpp index 7690e25420..d0161c097b 100644 --- a/src/coverage/CoveragePolygonValidator.cpp +++ b/src/coverage/CoveragePolygonValidator.cpp @@ -282,7 +282,7 @@ CoveragePolygonValidator::markInvalidInteriorSection( for (auto& adjPoly : adjCovPolygons) { if (adjPoly->intersectsEnv(sectionEnv)) { //-- test vertices in section - for (std::size_t i = iStart; i < iEnd; i++) { + for (auto i = iStart; i < iEnd; i++) { markInvalidInteriorSegment(ring, i, adjPoly.get()); } } @@ -307,7 +307,7 @@ CoveragePolygonValidator::markInvalidInteriorSegment( if (adjPoly->contains(p)) { ring.markInvalid(i); //-- previous segment may be interior (but may also be matched) - std::size_t iPrev = i == 0 ? ring.size()-2 : i-1; + auto iPrev = i == 0 ? ring.size()-2 : i-1; if (! ring.isKnown(iPrev)) ring.markInvalid(iPrev); }