Begin proper memory management on taxonomy

This commit is contained in:
Thomas Krijnen
2020-11-04 13:46:25 +01:00
parent e39c7e7195
commit 059de764d6
2 changed files with 27 additions and 18 deletions
+5
View File
@@ -344,6 +344,11 @@ struct edge : public trimmed_curve {
struct collection : public geom_item {
std::vector<item*> children;
collection() {}
collection(const collection& other) {
std::transform(other.children.begin(), other.children.end(), std::back_inserter(children), std::mem_fun(&item::clone));
}
template <typename T>
std::vector<T*> children_as() const {
std::vector<T*> ts;