From ae9acd6a78ebf4af8633c2f7927c75c8dd61d580 Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 20 Mar 2022 19:32:32 +0100 Subject: [PATCH] Path: fix assignment operator of CLine * Assignment operator in class CLine should have return type CLine&. Otherwise a copy is created at each call. --- src/Mod/Path/libarea/kurve/geometry.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Mod/Path/libarea/kurve/geometry.h b/src/Mod/Path/libarea/kurve/geometry.h index 58e6041dd1..a9e8f3460e 100644 --- a/src/Mod/Path/libarea/kurve/geometry.h +++ b/src/Mod/Path/libarea/kurve/geometry.h @@ -448,7 +448,7 @@ inline bool FNEZ(double a, double tolerance = TIGHT_TOLERANCE) {return fabs(a) > // operators const CLine operator~(void);// perp to left - const CLine operator=(const Point& p0){p.x=p0.x; p.y=p0.y; return *this;}; // s = p; + const CLine& operator=(const Point& p0){p.x=p0.x; p.y=p0.y; return *this;}; // s = p; // methods double c(); // returns c