From c59d988a8f3afbbc54f953364786060b8137e1c0 Mon Sep 17 00:00:00 2001 From: Prakhar Sharma Date: Sat, 31 Oct 2026 23:47:29 +0530 Subject: [PATCH] Fix const qualifiers of point::operator== and point::distance operator== took its argument by non-const reference and distance() was not a const member, so neither could be used with const points or temporaries. Both only read data, so behavior is unchanged. Fixes #522 --- include/cartesian_geom/point.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cartesian_geom/point.h b/include/cartesian_geom/point.h index b8c8e32b4..c3ca5d4d2 100644 --- a/include/cartesian_geom/point.h +++ b/include/cartesian_geom/point.h @@ -173,7 +173,7 @@ class point coeffs /= k; } - bool operator== (point& p) const + bool operator== (const point& p) const { int i=0; const Coeff & coeffs = p.getCoefficients(); @@ -190,7 +190,7 @@ class point return true; } - FT distance(point const & p) { + FT distance(point const & p) const { return (this->coeffs - p.coeffs).norm(); }