From 2111f205aeb8c16d12deb46ce59eb888f434fd79 Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Mon, 8 Jul 2019 21:07:21 -0700 Subject: [PATCH] Fabric: Removing `SharedYogaStylableProps` and small codestyle changes Summary: Trivial. We don't use it. Reviewed By: sammy-SC Differential Revision: D16139556 fbshipit-source-id: bac282c1aa228c10d27ebd636cf71fcc33b322e9 --- .../components/view/yoga/YogaStylableProps.cpp | 8 ++++---- .../fabric/components/view/yoga/YogaStylableProps.h | 12 ++++-------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp index 03478ee336..de1ea98d38 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp +++ b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.cpp @@ -19,19 +19,19 @@ namespace facebook { namespace react { -YogaStylableProps::YogaStylableProps(const YGStyle &yogaStyle) +YogaStylableProps::YogaStylableProps(YGStyle const &yogaStyle) : yogaStyle(yogaStyle) {} YogaStylableProps::YogaStylableProps( - const YogaStylableProps &sourceProps, - const RawProps &rawProps) + YogaStylableProps const &sourceProps, + RawProps const &rawProps) : yogaStyle(convertRawProp(rawProps, sourceProps.yogaStyle)){}; #pragma mark - DebugStringConvertible #if RN_DEBUG_STRING_CONVERTIBLE SharedDebugStringConvertibleList YogaStylableProps::getDebugProps() const { - const auto defaultYogaStyle = YGStyle{}; + auto const defaultYogaStyle = YGStyle{}; return { debugStringConvertibleItem( "direction", yogaStyle.direction(), defaultYogaStyle.direction()), diff --git a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h index 6fa82ebe14..a6b4795cda 100644 --- a/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h +++ b/ReactCommon/fabric/components/view/yoga/YogaStylableProps.h @@ -15,23 +15,19 @@ namespace facebook { namespace react { -class YogaStylableProps; - -typedef std::shared_ptr SharedYogaStylableProps; - class YogaStylableProps { public: YogaStylableProps() = default; - YogaStylableProps(const YGStyle &yogaStyle); + YogaStylableProps(YGStyle const &yogaStyle); YogaStylableProps( - const YogaStylableProps &sourceProps, - const RawProps &rawProps); + YogaStylableProps const &sourceProps, + RawProps const &rawProps); #pragma mark - Props protected: friend class YogaLayoutableShadowNode; - const YGStyle yogaStyle{}; + YGStyle const yogaStyle{}; #if RN_DEBUG_STRING_CONVERTIBLE