diff --git a/React/CSSLayout/Yoga.c b/React/CSSLayout/Yoga.c index 70afece2f..806983a58 100644 --- a/React/CSSLayout/Yoga.c +++ b/React/CSSLayout/Yoga.c @@ -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); } diff --git a/React/CSSLayout/Yoga.h b/React/CSSLayout/Yoga.h index 926a3b943..660599e7f 100644 --- a/React/CSSLayout/Yoga.h +++ b/React/CSSLayout/Yoga.h @@ -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, diff --git a/React/Views/RCTShadowView.m b/React/Views/RCTShadowView.m index d1fb3acdc..72aba32b3 100644 --- a/React/Views/RCTShadowView.m +++ b/React/Views/RCTShadowView.m @@ -185,7 +185,7 @@ DEFINE_PROCESS_META_PROPS(Border); viewsWithNewFrame:(NSMutableSet *)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 diff --git a/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp b/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp index bf17f087c..09236b886 100644 --- a/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp +++ b/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNI.cpp @@ -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 { diff --git a/ReactCommon/yoga/yoga/Yoga.c b/ReactCommon/yoga/yoga/Yoga.c index 6340d021c..dad811167 100644 --- a/ReactCommon/yoga/yoga/Yoga.c +++ b/ReactCommon/yoga/yoga/Yoga.c @@ -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); } diff --git a/ReactCommon/yoga/yoga/Yoga.h b/ReactCommon/yoga/yoga/Yoga.h index 79c59a4bf..3bb967271 100644 --- a/ReactCommon/yoga/yoga/Yoga.h +++ b/ReactCommon/yoga/yoga/Yoga.h @@ -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,