YGNodeChildCount -> YGNodeGetChildCount for consistency
Reviewed By: gkassabli Differential Revision: D4333480 fbshipit-source-id: 17058f18fa9e26b3e02f7a1651f7295cae59acad
This commit is contained in:
parent
c0ea23cfb0
commit
45fdcdc93a
|
@ -202,7 +202,7 @@ void YGNodeFree(const YGNodeRef node) {
|
|||
node->parent = NULL;
|
||||
}
|
||||
|
||||
const uint32_t childCount = YGNodeChildCount(node);
|
||||
const uint32_t childCount = YGNodeGetChildCount(node);
|
||||
for (uint32_t i = 0; i < childCount; i++) {
|
||||
const YGNodeRef child = YGNodeGetChild(node, i);
|
||||
child->parent = NULL;
|
||||
|
@ -214,7 +214,7 @@ void YGNodeFree(const YGNodeRef node) {
|
|||
}
|
||||
|
||||
void YGNodeFreeRecursive(const YGNodeRef root) {
|
||||
while (YGNodeChildCount(root) > 0) {
|
||||
while (YGNodeGetChildCount(root) > 0) {
|
||||
const YGNodeRef child = YGNodeGetChild(root, 0);
|
||||
YGNodeRemoveChild(root, child);
|
||||
YGNodeFreeRecursive(child);
|
||||
|
@ -223,7 +223,7 @@ void YGNodeFreeRecursive(const YGNodeRef root) {
|
|||
}
|
||||
|
||||
void YGNodeReset(const YGNodeRef node) {
|
||||
YG_ASSERT(YGNodeChildCount(node) == 0, "Cannot reset a node which still has children attached");
|
||||
YG_ASSERT(YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached");
|
||||
YG_ASSERT(node->parent == NULL, "Cannot reset a node still attached to a parent");
|
||||
|
||||
YGNodeListFree(node->children);
|
||||
|
@ -303,7 +303,7 @@ void YGNodeSetMeasureFunc(const YGNodeRef node, YGMeasureFunc measureFunc) {
|
|||
if (measureFunc == NULL) {
|
||||
node->measure = NULL;
|
||||
} else {
|
||||
YG_ASSERT(YGNodeChildCount(node) == 0,
|
||||
YG_ASSERT(YGNodeGetChildCount(node) == 0,
|
||||
"Cannot set measure function: Nodes with measure functions cannot have children.");
|
||||
node->measure = measureFunc;
|
||||
}
|
||||
|
@ -333,7 +333,7 @@ YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index) {
|
|||
return YGNodeListGet(node->children, index);
|
||||
}
|
||||
|
||||
inline uint32_t YGNodeChildCount(const YGNodeRef node) {
|
||||
inline uint32_t YGNodeGetChildCount(const YGNodeRef node) {
|
||||
return YGNodeListCount(node->children);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ WIN_EXPORT void YGNodeInsertChild(const YGNodeRef node,
|
|||
const uint32_t index);
|
||||
WIN_EXPORT void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child);
|
||||
WIN_EXPORT YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index);
|
||||
WIN_EXPORT uint32_t YGNodeChildCount(const YGNodeRef node);
|
||||
WIN_EXPORT uint32_t YGNodeGetChildCount(const YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeCalculateLayout(const YGNodeRef node,
|
||||
const float availableWidth,
|
||||
|
|
|
@ -185,7 +185,7 @@ DEFINE_PROCESS_META_PROPS(Border);
|
|||
viewsWithNewFrame:(NSMutableSet<RCTShadowView *> *)viewsWithNewFrame
|
||||
absolutePosition:(CGPoint)absolutePosition
|
||||
{
|
||||
for (unsigned int i = 0; i < YGNodeChildCount(node); ++i) {
|
||||
for (unsigned int i = 0; i < YGNodeGetChildCount(node); ++i) {
|
||||
RCTShadowView *child = (RCTShadowView *)_reactSubviews[i];
|
||||
[child applyLayoutNode:YGNodeGetChild(node, i)
|
||||
viewsWithNewFrame:viewsWithNewFrame
|
||||
|
|
|
@ -36,7 +36,7 @@ static void YGTransferLayoutOutputsRecursive(YGNodeRef root) {
|
|||
obj->setFieldValue(topField, YGNodeLayoutGetTop(root));
|
||||
YGTransferLayoutDirection(root, obj);
|
||||
|
||||
for (uint32_t i = 0; i < YGNodeChildCount(root); i++) {
|
||||
for (uint32_t i = 0; i < YGNodeGetChildCount(root); i++) {
|
||||
YGTransferLayoutOutputsRecursive(YGNodeGetChild(root, i));
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -256,7 +256,7 @@ void YGNodeFree(const YGNodeRef node) {
|
|||
node->parent = NULL;
|
||||
}
|
||||
|
||||
const uint32_t childCount = YGNodeChildCount(node);
|
||||
const uint32_t childCount = YGNodeGetChildCount(node);
|
||||
for (uint32_t i = 0; i < childCount; i++) {
|
||||
const YGNodeRef child = YGNodeGetChild(node, i);
|
||||
child->parent = NULL;
|
||||
|
@ -268,7 +268,7 @@ void YGNodeFree(const YGNodeRef node) {
|
|||
}
|
||||
|
||||
void YGNodeFreeRecursive(const YGNodeRef root) {
|
||||
while (YGNodeChildCount(root) > 0) {
|
||||
while (YGNodeGetChildCount(root) > 0) {
|
||||
const YGNodeRef child = YGNodeGetChild(root, 0);
|
||||
YGNodeRemoveChild(root, child);
|
||||
YGNodeFreeRecursive(child);
|
||||
|
@ -277,7 +277,7 @@ void YGNodeFreeRecursive(const YGNodeRef root) {
|
|||
}
|
||||
|
||||
void YGNodeReset(const YGNodeRef node) {
|
||||
YG_ASSERT(YGNodeChildCount(node) == 0, "Cannot reset a node which still has children attached");
|
||||
YG_ASSERT(YGNodeGetChildCount(node) == 0, "Cannot reset a node which still has children attached");
|
||||
YG_ASSERT(node->parent == NULL, "Cannot reset a node still attached to a parent");
|
||||
|
||||
YGNodeListFree(node->children);
|
||||
|
@ -303,7 +303,7 @@ void YGNodeSetMeasureFunc(const YGNodeRef node, YGMeasureFunc measureFunc) {
|
|||
if (measureFunc == NULL) {
|
||||
node->measure = NULL;
|
||||
} else {
|
||||
YG_ASSERT(YGNodeChildCount(node) == 0,
|
||||
YG_ASSERT(YGNodeGetChildCount(node) == 0,
|
||||
"Cannot set measure function: Nodes with measure functions cannot have children.");
|
||||
node->measure = measureFunc;
|
||||
}
|
||||
|
@ -337,7 +337,7 @@ YGNodeRef YGNodeGetParent(const YGNodeRef node) {
|
|||
return node->parent;
|
||||
}
|
||||
|
||||
inline uint32_t YGNodeChildCount(const YGNodeRef node) {
|
||||
inline uint32_t YGNodeGetChildCount(const YGNodeRef node) {
|
||||
return YGNodeListCount(node->children);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ WIN_EXPORT void YGNodeInsertChild(const YGNodeRef node,
|
|||
WIN_EXPORT void YGNodeRemoveChild(const YGNodeRef node, const YGNodeRef child);
|
||||
WIN_EXPORT YGNodeRef YGNodeGetChild(const YGNodeRef node, const uint32_t index);
|
||||
WIN_EXPORT YGNodeRef YGNodeGetParent(const YGNodeRef node);
|
||||
WIN_EXPORT uint32_t YGNodeChildCount(const YGNodeRef node);
|
||||
WIN_EXPORT uint32_t YGNodeGetChildCount(const YGNodeRef node);
|
||||
|
||||
WIN_EXPORT void YGNodeCalculateLayout(const YGNodeRef node,
|
||||
const float availableWidth,
|
||||
|
|
Loading…
Reference in New Issue