mirror of
https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git
synced 2026-05-14 19:12:38 -07:00
Addtional check for TPPLPoly::operator=
This commit is contained in:
committed by
Alessandro Ranellucci
parent
d62f33b0b4
commit
c90ecac48e
@@ -74,11 +74,13 @@ TPPLPoly::TPPLPoly(const TPPLPoly &src) {
|
||||
}
|
||||
|
||||
TPPLPoly& TPPLPoly::operator=(const TPPLPoly &src) {
|
||||
Clear();
|
||||
hole = src.hole;
|
||||
numpoints = src.numpoints;
|
||||
points = new TPPLPoint[numpoints];
|
||||
memcpy(points, src.points, numpoints*sizeof(TPPLPoint));
|
||||
if(&src != this) {
|
||||
Clear();
|
||||
hole = src.hole;
|
||||
numpoints = src.numpoints;
|
||||
points = new TPPLPoint[numpoints];
|
||||
memcpy(points, src.points, numpoints*sizeof(TPPLPoint));
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user