YGNodeChildCount -> YGNodeGetChildCount for consistency

Summary: I kept wrongly typing this function which is a good sign that the name is inconsistent.

Reviewed By: gkassabli

Differential Revision: D4333480

fbshipit-source-id: 17058f18fa9e26b3e02f7a1651f7295cae59acad
This commit is contained in:
Emil Sjolander
2016-12-16 04:39:13 -08:00
committed by Facebook Github Bot
parent 04fe81f88f
commit 0296511f2c
6 changed files with 13 additions and 13 deletions

View File

@@ -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);
}