From 93f5d06a9e9cf604891f9ad572ebccfcba4f0fd3 Mon Sep 17 00:00:00 2001 From: Daniel Baston Date: Wed, 15 Feb 2023 21:12:27 -0500 Subject: [PATCH] PreparedLineStringIntersects: Take input by const ref --- include/geos/geom/prep/PreparedLineStringIntersects.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/include/geos/geom/prep/PreparedLineStringIntersects.h b/include/geos/geom/prep/PreparedLineStringIntersects.h index 026455df5f..980b0b0ebc 100644 --- a/include/geos/geom/prep/PreparedLineStringIntersects.h +++ b/include/geos/geom/prep/PreparedLineStringIntersects.h @@ -58,10 +58,7 @@ class PreparedLineStringIntersects { return op.intersects(geom); } - /** - * \todo FIXME - mloskot: Why not taking linestring through const reference? - */ - PreparedLineStringIntersects(PreparedLineString& prep) + PreparedLineStringIntersects(const PreparedLineString& prep) : prepLine(prep) { } @@ -74,7 +71,7 @@ class PreparedLineStringIntersects { bool intersects(const geom::Geometry* g) const; protected: - PreparedLineString& prepLine; + const PreparedLineString& prepLine; /** * Tests whether any representative point of the test Geometry intersects