Fixed a memory leak in the move assignment operator in ExtrusionEntityCollection.
This commit is contained in:
parent
c78ccdbb74
commit
e0e34f6a53
@ -85,7 +85,7 @@ public:
|
|||||||
virtual ExtrusionEntity* clone() const = 0;
|
virtual ExtrusionEntity* clone() const = 0;
|
||||||
// Create a new object, initialize it with this object using the move semantics.
|
// Create a new object, initialize it with this object using the move semantics.
|
||||||
virtual ExtrusionEntity* clone_move() = 0;
|
virtual ExtrusionEntity* clone_move() = 0;
|
||||||
virtual ~ExtrusionEntity() {}
|
virtual ~ExtrusionEntity() = default;
|
||||||
virtual void reverse() = 0;
|
virtual void reverse() = 0;
|
||||||
virtual const Point& first_point() const = 0;
|
virtual const Point& first_point() const = 0;
|
||||||
virtual const Point& last_point() const = 0;
|
virtual const Point& last_point() const = 0;
|
||||||
|
@ -36,9 +36,13 @@ public:
|
|||||||
ExtrusionEntityCollection(ExtrusionEntityCollection &&other) : entities(std::move(other.entities)), no_sort(other.no_sort) {}
|
ExtrusionEntityCollection(ExtrusionEntityCollection &&other) : entities(std::move(other.entities)), no_sort(other.no_sort) {}
|
||||||
explicit ExtrusionEntityCollection(const ExtrusionPaths &paths);
|
explicit ExtrusionEntityCollection(const ExtrusionPaths &paths);
|
||||||
ExtrusionEntityCollection& operator=(const ExtrusionEntityCollection &other);
|
ExtrusionEntityCollection& operator=(const ExtrusionEntityCollection &other);
|
||||||
ExtrusionEntityCollection& operator=(ExtrusionEntityCollection &&other)
|
ExtrusionEntityCollection& operator=(ExtrusionEntityCollection &&other) {
|
||||||
{ this->entities = std::move(other.entities); this->no_sort = other.no_sort; return *this; }
|
this->clear();
|
||||||
~ExtrusionEntityCollection() { clear(); }
|
this->entities = std::move(other.entities);
|
||||||
|
this->no_sort = other.no_sort;
|
||||||
|
return *this;
|
||||||
|
}
|
||||||
|
~ExtrusionEntityCollection() override { clear(); }
|
||||||
explicit operator ExtrusionPaths() const;
|
explicit operator ExtrusionPaths() const;
|
||||||
|
|
||||||
bool is_collection() const override { return true; }
|
bool is_collection() const override { return true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user