| 202 | } |
| 203 | |
| 204 | bool HPNode::removeChild(HPNodeRef child) { |
| 205 | std::vector<HPNodeRef>::iterator p = std::find(children.begin(), |
| 206 | children.end(), child); |
| 207 | if (p != children.end()) { |
| 208 | children.erase(p); |
| 209 | child->setParent(nullptr); |
| 210 | child->resetLayoutRecursive(false); |
| 211 | markAsDirty(); |
| 212 | return true; |
| 213 | } |
| 214 | return false; |
| 215 | } |
| 216 | |
| 217 | bool HPNode::removeChild(uint32_t index) { |
| 218 | if (index > children.size() - 1) { |
no test coverage detected