csg2d - proper +=/-=/*= operator

This commit is contained in:
Matthias Hochsteger 2020-08-28 14:21:45 +02:00
parent ab34a185ce
commit ac87e9b62c
2 changed files with 6 additions and 6 deletions

View File

@ -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;

View File

@ -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 )
{