mirror of
https://github.com/status-im/react-native.git
synced 2025-02-04 13:44:04 +00:00
Zero out all fields in YGZeroOutLayoutRecursivly using memset
Reviewed By: emilsjolander Differential Revision: D5842351 fbshipit-source-id: d2c2b6f829588a200525b7ccbdb63003cb4dcc4e
This commit is contained in:
parent
cf2ef84b16
commit
d0f36d7a68
@ -1865,18 +1865,7 @@ static bool YGNodeFixedSizeSetMeasuredDimensions(const YGNodeRef node,
|
||||
}
|
||||
|
||||
static void YGZeroOutLayoutRecursivly(const YGNodeRef node) {
|
||||
node->layout.dimensions[YGDimensionHeight] = 0;
|
||||
node->layout.dimensions[YGDimensionWidth] = 0;
|
||||
node->layout.position[YGEdgeTop] = 0;
|
||||
node->layout.position[YGEdgeBottom] = 0;
|
||||
node->layout.position[YGEdgeLeft] = 0;
|
||||
node->layout.position[YGEdgeRight] = 0;
|
||||
node->layout.cachedLayout.availableHeight = 0;
|
||||
node->layout.cachedLayout.availableWidth = 0;
|
||||
node->layout.cachedLayout.heightMeasureMode = YGMeasureModeExactly;
|
||||
node->layout.cachedLayout.widthMeasureMode = YGMeasureModeExactly;
|
||||
node->layout.cachedLayout.computedWidth = 0;
|
||||
node->layout.cachedLayout.computedHeight = 0;
|
||||
memset(&(node->layout), 0, sizeof(YGLayout));
|
||||
node->hasNewLayout = true;
|
||||
const uint32_t childCount = YGNodeGetChildCount(node);
|
||||
for (uint32_t i = 0; i < childCount; i++) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user