Skip to content

Commit

Permalink
change to using auto in Coverage classes
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-jts committed May 24, 2024
1 parent c6d3008 commit d20c3ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/coverage/CoveragePolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
4 changes: 2 additions & 2 deletions src/coverage/CoveragePolygonValidator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}
Expand All @@ -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);
}
Expand Down

0 comments on commit d20c3ee

Please sign in to comment.