mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-13 05:31:47 +08:00
Addtional check for TPPLPoly::operator=
This commit is contained in:
parent
d62f33b0b4
commit
c90ecac48e
@ -74,11 +74,13 @@ TPPLPoly::TPPLPoly(const TPPLPoly &src) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
TPPLPoly& TPPLPoly::operator=(const TPPLPoly &src) {
|
TPPLPoly& TPPLPoly::operator=(const TPPLPoly &src) {
|
||||||
Clear();
|
if(&src != this) {
|
||||||
hole = src.hole;
|
Clear();
|
||||||
numpoints = src.numpoints;
|
hole = src.hole;
|
||||||
points = new TPPLPoint[numpoints];
|
numpoints = src.numpoints;
|
||||||
memcpy(points, src.points, numpoints*sizeof(TPPLPoint));
|
points = new TPPLPoint[numpoints];
|
||||||
|
memcpy(points, src.points, numpoints*sizeof(TPPLPoint));
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user