MCPcopy Create free account
hub / github.com/Tencent/Hippy / removeChild

Method removeChild

layout/engine/HPNode.cpp:204–215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204bool 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
217bool HPNode::removeChild(uint32_t index) {
218 if (index > children.size() - 1) {

Callers 2

HPNodeRemoveChildFunction · 0.45
~HPNodeMethod · 0.45

Calls 5

beginMethod · 0.45
endMethod · 0.45
setParentMethod · 0.45
resetLayoutRecursiveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected