From ca6d263d6d5ef3f7560fe52c18a3e1f714dcf956 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Sat, 4 Aug 2018 09:30:22 -0700 Subject: [PATCH] Fabric: ConcreteViewShadowNode::BaseShadowNode type alias Summary: @public Just a type alias to make the code prettier, nothing more. Reviewed By: mdvacca Differential Revision: D8988383 fbshipit-source-id: 3f21de0ec0cb9a2270eccfc4a67a3d1108535e42 --- .../components/view/ConcreteViewShadowNode.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h b/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h index da84b55d0..423b1911c 100644 --- a/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h +++ b/ReactCommon/fabric/components/view/ConcreteViewShadowNode.h @@ -43,17 +43,18 @@ class ConcreteViewShadowNode: static_assert(std::is_base_of::value, "ViewPropsT must be a descendant of AccessibilityProps"); public: + using BaseShadowNode = ConcreteShadowNode< + concreteComponentName, + ViewPropsT, + ViewEventEmitterT + >; using ConcreteViewProps = ViewPropsT; - using SharedConcreteViewProps = std::shared_ptr; - using ConcreteViewEventEmitter = ViewEventEmitterT; - using SharedConcreteViewEventEmitter = std::shared_ptr; - using SharedConcreteViewShadowNode = std::shared_ptr; ConcreteViewShadowNode( const ShadowNodeFragment &fragment, const ShadowNodeCloneFunction &cloneFunction ): - ConcreteShadowNode( + BaseShadowNode( fragment, cloneFunction ), @@ -63,14 +64,14 @@ public: YogaLayoutableShadowNode() { YogaLayoutableShadowNode::setProps(*std::static_pointer_cast(fragment.props)); - YogaLayoutableShadowNode::setChildren(ConcreteShadowNode::template getChildrenSlice()); + YogaLayoutableShadowNode::setChildren(BaseShadowNode::template getChildrenSlice()); }; ConcreteViewShadowNode( const SharedShadowNode &sourceShadowNode, const ShadowNodeFragment &fragment ): - ConcreteShadowNode( + BaseShadowNode( sourceShadowNode, fragment ), @@ -87,7 +88,7 @@ public: } if (fragment.children) { - YogaLayoutableShadowNode::setChildren(ConcreteShadowNode::template getChildrenSlice()); + YogaLayoutableShadowNode::setChildren(BaseShadowNode::template getChildrenSlice()); } };