mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-05-19 13:02:37 +08:00
Fabric: More restrictive types (const &) for ShadowNode constuctors' arguments
Summary: Should be more performant theoretically. Reviewed By: mdvacca Differential Revision: D7591713 fbshipit-source-id: 74141053f2b91cb621cc0d573f89f3454512c585
This commit is contained in:
committed by
Facebook Github Bot
parent
3fd2e2da4f
commit
c399d69716
@@ -21,11 +21,11 @@ SharedShadowNodeSharedList ShadowNode::emptySharedShadowNodeSharedList() {
|
||||
#pragma mark - Constructors
|
||||
|
||||
ShadowNode::ShadowNode(
|
||||
Tag tag,
|
||||
Tag rootTag,
|
||||
InstanceHandle instanceHandle,
|
||||
SharedProps props,
|
||||
SharedShadowNodeSharedList children
|
||||
const Tag &tag,
|
||||
const Tag &rootTag,
|
||||
const InstanceHandle &instanceHandle,
|
||||
const SharedProps &props,
|
||||
const SharedShadowNodeSharedList &children
|
||||
):
|
||||
tag_(tag),
|
||||
rootTag_(rootTag),
|
||||
@@ -35,9 +35,9 @@ ShadowNode::ShadowNode(
|
||||
revision_(1) {}
|
||||
|
||||
ShadowNode::ShadowNode(
|
||||
SharedShadowNode shadowNode,
|
||||
SharedProps props,
|
||||
SharedShadowNodeSharedList children
|
||||
const SharedShadowNode &shadowNode,
|
||||
const SharedProps &props,
|
||||
const SharedShadowNodeSharedList &children
|
||||
):
|
||||
tag_(shadowNode->tag_),
|
||||
rootTag_(shadowNode->rootTag_),
|
||||
|
||||
@@ -35,17 +35,17 @@ public:
|
||||
#pragma mark - Constructors
|
||||
|
||||
ShadowNode(
|
||||
Tag tag,
|
||||
Tag rootTag,
|
||||
InstanceHandle instanceHandle,
|
||||
SharedProps props = SharedProps(),
|
||||
SharedShadowNodeSharedList children = SharedShadowNodeSharedList()
|
||||
const Tag &tag,
|
||||
const Tag &rootTag,
|
||||
const InstanceHandle &instanceHandle,
|
||||
const SharedProps &props = SharedProps(),
|
||||
const SharedShadowNodeSharedList &children = SharedShadowNodeSharedList()
|
||||
);
|
||||
|
||||
ShadowNode(
|
||||
SharedShadowNode shadowNode,
|
||||
SharedProps props = nullptr,
|
||||
SharedShadowNodeSharedList children = nullptr
|
||||
const SharedShadowNode &shadowNode,
|
||||
const SharedProps &props = nullptr,
|
||||
const SharedShadowNodeSharedList &children = nullptr
|
||||
);
|
||||
|
||||
#pragma mark - Getters
|
||||
|
||||
Reference in New Issue
Block a user