| 171 | } |
| 172 | |
| 173 | std::unique_ptr<tree_node_t> split_node_t::remove_child( |
| 174 | nonstd::observer_ptr<tree_node_t> child, wf::txn::transaction_uptr& tx) |
| 175 | { |
| 176 | /* Remove child */ |
| 177 | std::unique_ptr<tree_node_t> result; |
| 178 | auto it = this->children.begin(); |
| 179 | |
| 180 | while (it != this->children.end()) |
| 181 | { |
| 182 | if (it->get() == child.get()) |
| 183 | { |
| 184 | result = std::move(*it); |
| 185 | it = this->children.erase(it); |
| 186 | } else |
| 187 | { |
| 188 | ++it; |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | /* Remaining children have the full geometry */ |
| 193 | recalculate_children(this->geometry, tx); |
| 194 | result->parent = nullptr; |
| 195 | |
| 196 | return result; |
| 197 | } |
| 198 | |
| 199 | void split_node_t::set_geometry(wf::geometry_t geometry, wf::txn::transaction_uptr& tx) |
| 200 | { |
no test coverage detected