From ac87e9b62cc77bf373b00e1e7d547b26b1cb7bc5 Mon Sep 17 00:00:00 2001 From: Matthias Hochsteger Date: Fri, 28 Aug 2020 14:21:45 +0200 Subject: [PATCH] csg2d - proper +=/-=/*= operator --- libsrc/geom2d/csg2d.cpp | 6 +++--- libsrc/geom2d/csg2d.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libsrc/geom2d/csg2d.cpp b/libsrc/geom2d/csg2d.cpp index d1871166..af05475a 100644 --- a/libsrc/geom2d/csg2d.cpp +++ b/libsrc/geom2d/csg2d.cpp @@ -1380,19 +1380,19 @@ Solid2d Solid2d :: operator-(const Solid2d & other_) const return res; } -Solid2d Solid2d :: operator+=(const Solid2d & other) +Solid2d & Solid2d :: operator+=(const Solid2d & other) { *this = *this + other; return *this; } -Solid2d Solid2d :: operator*=(const Solid2d & other) +Solid2d & Solid2d :: operator*=(const Solid2d & other) { *this = *this * other; return *this; } -Solid2d Solid2d :: operator-=(const Solid2d & other) +Solid2d & Solid2d :: operator-=(const Solid2d & other) { *this = *this - other; return *this; diff --git a/libsrc/geom2d/csg2d.hpp b/libsrc/geom2d/csg2d.hpp index a7a92b12..42054bd5 100644 --- a/libsrc/geom2d/csg2d.hpp +++ b/libsrc/geom2d/csg2d.hpp @@ -575,9 +575,9 @@ struct Solid2d Solid2d operator-(const Solid2d & other) const; Solid2d& operator=(const Solid2d & other) = default; - Solid2d operator+=(const Solid2d & other); - Solid2d operator*=(const Solid2d & other); - Solid2d operator-=(const Solid2d & other); + Solid2d& operator+=(const Solid2d & other); + Solid2d& operator*=(const Solid2d & other); + Solid2d& operator-=(const Solid2d & other); void Append( const Loop & poly ) {