Use YGNodeRemoveAllChildren
where appropriate
Summary: @public `YGNodeRemoveAllChildren` can be used instead of removing children of a yoga node in a loop. Reviewed By: zats Differential Revision: D14131679 fbshipit-source-id: 6ee31f1e288b9b161c641b5bca4f2c1156d58c38
This commit is contained in:
committed by
Facebook Github Bot
parent
4463fe0856
commit
d38db1292c
@@ -425,9 +425,7 @@ static void YGRemoveAllChildren(const YGNodeRef node)
|
||||
return;
|
||||
}
|
||||
|
||||
while (YGNodeGetChildCount(node) > 0) {
|
||||
YGNodeRemoveChild(node, YGNodeGetChild(node, YGNodeGetChildCount(node) - 1));
|
||||
}
|
||||
YGNodeRemoveAllChildren(node);
|
||||
}
|
||||
|
||||
static CGFloat YGRoundPixelValue(CGFloat value)
|
||||
|
Reference in New Issue
Block a user