mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
Remove unused YGNode::*nextChild
Summary: This linked list was never used, and YGNodeDeepClone was doing scary things to maintain it. Reviewed By: davidaurelio Differential Revision: D8792864 fbshipit-source-id: c578fabe65c837f0791aa9ac3e18f31d93691abd
This commit is contained in:
parent
00936a003c
commit
4858454718
@ -69,10 +69,6 @@ YGNodeRef YGNode::getChild(uint32_t index) const {
|
||||
return children_.at(index);
|
||||
}
|
||||
|
||||
YGNodeRef YGNode::getNextChild() const {
|
||||
return nextChild_;
|
||||
}
|
||||
|
||||
YGConfigRef YGNode::getConfig() const {
|
||||
return config_;
|
||||
}
|
||||
@ -249,10 +245,6 @@ void YGNode::setChildren(const YGVector& children) {
|
||||
children_ = children;
|
||||
}
|
||||
|
||||
void YGNode::setNextChild(YGNodeRef nextChild) {
|
||||
nextChild_ = nextChild;
|
||||
}
|
||||
|
||||
void YGNode::replaceChild(YGNodeRef child, uint32_t index) {
|
||||
children_[index] = child;
|
||||
}
|
||||
@ -405,7 +397,6 @@ YGNode::YGNode()
|
||||
lineIndex_(0),
|
||||
owner_(nullptr),
|
||||
children_(YGVector()),
|
||||
nextChild_(nullptr),
|
||||
config_(nullptr),
|
||||
isDirty_(false),
|
||||
resolvedDimensions_({{YGValueUndefined, YGValueUndefined}}) {}
|
||||
@ -423,7 +414,6 @@ YGNode::YGNode(const YGNode& node)
|
||||
lineIndex_(node.lineIndex_),
|
||||
owner_(node.owner_),
|
||||
children_(node.children_),
|
||||
nextChild_(node.nextChild_),
|
||||
config_(node.config_),
|
||||
isDirty_(node.isDirty_),
|
||||
resolvedDimensions_(node.resolvedDimensions_) {}
|
||||
@ -445,7 +435,6 @@ YGNode::YGNode(
|
||||
uint32_t lineIndex,
|
||||
YGNodeRef owner,
|
||||
const YGVector& children,
|
||||
YGNodeRef nextChild,
|
||||
YGConfigRef config,
|
||||
bool isDirty,
|
||||
std::array<YGValue, 2> resolvedDimensions)
|
||||
@ -461,7 +450,6 @@ YGNode::YGNode(
|
||||
lineIndex_(lineIndex),
|
||||
owner_(owner),
|
||||
children_(children),
|
||||
nextChild_(nextChild),
|
||||
config_(config),
|
||||
isDirty_(isDirty),
|
||||
resolvedDimensions_(resolvedDimensions) {}
|
||||
@ -487,7 +475,6 @@ YGNode& YGNode::operator=(const YGNode& node) {
|
||||
lineIndex_ = node.getLineIndex();
|
||||
owner_ = node.getOwner();
|
||||
children_ = node.getChildren();
|
||||
nextChild_ = node.getNextChild();
|
||||
config_ = node.getConfig();
|
||||
isDirty_ = node.isDirty();
|
||||
resolvedDimensions_ = node.getResolvedDimensions();
|
||||
|
@ -26,7 +26,6 @@ struct YGNode {
|
||||
uint32_t lineIndex_;
|
||||
YGNodeRef owner_;
|
||||
YGVector children_;
|
||||
YGNodeRef nextChild_;
|
||||
YGConfigRef config_;
|
||||
bool isDirty_;
|
||||
std::array<YGValue, 2> resolvedDimensions_;
|
||||
@ -54,7 +53,6 @@ struct YGNode {
|
||||
uint32_t lineIndex,
|
||||
YGNodeRef owner,
|
||||
const YGVector& children,
|
||||
YGNodeRef nextChild,
|
||||
YGConfigRef config,
|
||||
bool isDirty,
|
||||
std::array<YGValue, 2> resolvedDimensions);
|
||||
@ -83,7 +81,6 @@ struct YGNode {
|
||||
YGVector getChildren() const;
|
||||
uint32_t getChildrenCount() const;
|
||||
YGNodeRef getChild(uint32_t index) const;
|
||||
YGNodeRef getNextChild() const;
|
||||
YGConfigRef getConfig() const;
|
||||
bool isDirty() const;
|
||||
std::array<YGValue, 2> getResolvedDimensions() const;
|
||||
@ -136,7 +133,6 @@ struct YGNode {
|
||||
void setLineIndex(uint32_t lineIndex);
|
||||
void setOwner(YGNodeRef owner);
|
||||
void setChildren(const YGVector& children);
|
||||
void setNextChild(YGNodeRef nextChild);
|
||||
void setConfig(YGConfigRef config);
|
||||
void setDirty(bool isDirty);
|
||||
void setLayoutLastOwnerDirection(YGDirection direction);
|
||||
|
@ -275,10 +275,6 @@ static YGNodeRef YGNodeDeepClone(YGNodeRef oldNode) {
|
||||
node->setConfig(YGConfigClone(*(oldNode->getConfig())));
|
||||
}
|
||||
|
||||
if (oldNode->getNextChild() != nullptr) {
|
||||
node->setNextChild(YGNodeDeepClone(oldNode->getNextChild()));
|
||||
}
|
||||
|
||||
return node;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user