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);
|
return children_.at(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
YGNodeRef YGNode::getNextChild() const {
|
|
||||||
return nextChild_;
|
|
||||||
}
|
|
||||||
|
|
||||||
YGConfigRef YGNode::getConfig() const {
|
YGConfigRef YGNode::getConfig() const {
|
||||||
return config_;
|
return config_;
|
||||||
}
|
}
|
||||||
@ -249,10 +245,6 @@ void YGNode::setChildren(const YGVector& children) {
|
|||||||
children_ = children;
|
children_ = children;
|
||||||
}
|
}
|
||||||
|
|
||||||
void YGNode::setNextChild(YGNodeRef nextChild) {
|
|
||||||
nextChild_ = nextChild;
|
|
||||||
}
|
|
||||||
|
|
||||||
void YGNode::replaceChild(YGNodeRef child, uint32_t index) {
|
void YGNode::replaceChild(YGNodeRef child, uint32_t index) {
|
||||||
children_[index] = child;
|
children_[index] = child;
|
||||||
}
|
}
|
||||||
@ -405,7 +397,6 @@ YGNode::YGNode()
|
|||||||
lineIndex_(0),
|
lineIndex_(0),
|
||||||
owner_(nullptr),
|
owner_(nullptr),
|
||||||
children_(YGVector()),
|
children_(YGVector()),
|
||||||
nextChild_(nullptr),
|
|
||||||
config_(nullptr),
|
config_(nullptr),
|
||||||
isDirty_(false),
|
isDirty_(false),
|
||||||
resolvedDimensions_({{YGValueUndefined, YGValueUndefined}}) {}
|
resolvedDimensions_({{YGValueUndefined, YGValueUndefined}}) {}
|
||||||
@ -423,7 +414,6 @@ YGNode::YGNode(const YGNode& node)
|
|||||||
lineIndex_(node.lineIndex_),
|
lineIndex_(node.lineIndex_),
|
||||||
owner_(node.owner_),
|
owner_(node.owner_),
|
||||||
children_(node.children_),
|
children_(node.children_),
|
||||||
nextChild_(node.nextChild_),
|
|
||||||
config_(node.config_),
|
config_(node.config_),
|
||||||
isDirty_(node.isDirty_),
|
isDirty_(node.isDirty_),
|
||||||
resolvedDimensions_(node.resolvedDimensions_) {}
|
resolvedDimensions_(node.resolvedDimensions_) {}
|
||||||
@ -445,7 +435,6 @@ YGNode::YGNode(
|
|||||||
uint32_t lineIndex,
|
uint32_t lineIndex,
|
||||||
YGNodeRef owner,
|
YGNodeRef owner,
|
||||||
const YGVector& children,
|
const YGVector& children,
|
||||||
YGNodeRef nextChild,
|
|
||||||
YGConfigRef config,
|
YGConfigRef config,
|
||||||
bool isDirty,
|
bool isDirty,
|
||||||
std::array<YGValue, 2> resolvedDimensions)
|
std::array<YGValue, 2> resolvedDimensions)
|
||||||
@ -461,7 +450,6 @@ YGNode::YGNode(
|
|||||||
lineIndex_(lineIndex),
|
lineIndex_(lineIndex),
|
||||||
owner_(owner),
|
owner_(owner),
|
||||||
children_(children),
|
children_(children),
|
||||||
nextChild_(nextChild),
|
|
||||||
config_(config),
|
config_(config),
|
||||||
isDirty_(isDirty),
|
isDirty_(isDirty),
|
||||||
resolvedDimensions_(resolvedDimensions) {}
|
resolvedDimensions_(resolvedDimensions) {}
|
||||||
@ -487,7 +475,6 @@ YGNode& YGNode::operator=(const YGNode& node) {
|
|||||||
lineIndex_ = node.getLineIndex();
|
lineIndex_ = node.getLineIndex();
|
||||||
owner_ = node.getOwner();
|
owner_ = node.getOwner();
|
||||||
children_ = node.getChildren();
|
children_ = node.getChildren();
|
||||||
nextChild_ = node.getNextChild();
|
|
||||||
config_ = node.getConfig();
|
config_ = node.getConfig();
|
||||||
isDirty_ = node.isDirty();
|
isDirty_ = node.isDirty();
|
||||||
resolvedDimensions_ = node.getResolvedDimensions();
|
resolvedDimensions_ = node.getResolvedDimensions();
|
||||||
|
@ -26,7 +26,6 @@ struct YGNode {
|
|||||||
uint32_t lineIndex_;
|
uint32_t lineIndex_;
|
||||||
YGNodeRef owner_;
|
YGNodeRef owner_;
|
||||||
YGVector children_;
|
YGVector children_;
|
||||||
YGNodeRef nextChild_;
|
|
||||||
YGConfigRef config_;
|
YGConfigRef config_;
|
||||||
bool isDirty_;
|
bool isDirty_;
|
||||||
std::array<YGValue, 2> resolvedDimensions_;
|
std::array<YGValue, 2> resolvedDimensions_;
|
||||||
@ -54,7 +53,6 @@ struct YGNode {
|
|||||||
uint32_t lineIndex,
|
uint32_t lineIndex,
|
||||||
YGNodeRef owner,
|
YGNodeRef owner,
|
||||||
const YGVector& children,
|
const YGVector& children,
|
||||||
YGNodeRef nextChild,
|
|
||||||
YGConfigRef config,
|
YGConfigRef config,
|
||||||
bool isDirty,
|
bool isDirty,
|
||||||
std::array<YGValue, 2> resolvedDimensions);
|
std::array<YGValue, 2> resolvedDimensions);
|
||||||
@ -83,7 +81,6 @@ struct YGNode {
|
|||||||
YGVector getChildren() const;
|
YGVector getChildren() const;
|
||||||
uint32_t getChildrenCount() const;
|
uint32_t getChildrenCount() const;
|
||||||
YGNodeRef getChild(uint32_t index) const;
|
YGNodeRef getChild(uint32_t index) const;
|
||||||
YGNodeRef getNextChild() const;
|
|
||||||
YGConfigRef getConfig() const;
|
YGConfigRef getConfig() const;
|
||||||
bool isDirty() const;
|
bool isDirty() const;
|
||||||
std::array<YGValue, 2> getResolvedDimensions() const;
|
std::array<YGValue, 2> getResolvedDimensions() const;
|
||||||
@ -136,7 +133,6 @@ struct YGNode {
|
|||||||
void setLineIndex(uint32_t lineIndex);
|
void setLineIndex(uint32_t lineIndex);
|
||||||
void setOwner(YGNodeRef owner);
|
void setOwner(YGNodeRef owner);
|
||||||
void setChildren(const YGVector& children);
|
void setChildren(const YGVector& children);
|
||||||
void setNextChild(YGNodeRef nextChild);
|
|
||||||
void setConfig(YGConfigRef config);
|
void setConfig(YGConfigRef config);
|
||||||
void setDirty(bool isDirty);
|
void setDirty(bool isDirty);
|
||||||
void setLayoutLastOwnerDirection(YGDirection direction);
|
void setLayoutLastOwnerDirection(YGDirection direction);
|
||||||
|
@ -275,10 +275,6 @@ static YGNodeRef YGNodeDeepClone(YGNodeRef oldNode) {
|
|||||||
node->setConfig(YGConfigClone(*(oldNode->getConfig())));
|
node->setConfig(YGConfigClone(*(oldNode->getConfig())));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (oldNode->getNextChild() != nullptr) {
|
|
||||||
node->setNextChild(YGNodeDeepClone(oldNode->getNextChild()));
|
|
||||||
}
|
|
||||||
|
|
||||||
return node;
|
return node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user