diff --git a/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h b/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h index 40a3c0ad57..67194d3733 100644 --- a/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h +++ b/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h @@ -12,24 +12,24 @@ class RNSScreenComponentDescriptor final public: using ConcreteComponentDescriptor::ConcreteComponentDescriptor; - void adopt(ShadowNode::Unshared const &shadowNode) const override { + void adopt(ShadowNode& shadowNode) const override { react_native_assert( - std::dynamic_pointer_cast(shadowNode)); - auto screenShadowNode = - std::static_pointer_cast(shadowNode); + dynamic_cast(&shadowNode)); + auto& screenShadowNode = + static_cast(shadowNode); react_native_assert( - std::dynamic_pointer_cast(screenShadowNode)); - auto layoutableShadowNode = - std::static_pointer_cast(screenShadowNode); + dynamic_cast(&screenShadowNode)); + auto& layoutableShadowNode = + dynamic_cast(screenShadowNode); auto state = std::static_pointer_cast( - shadowNode->getState()); + shadowNode.getState()); auto stateData = state->getData(); if (stateData.frameSize.width != 0 && stateData.frameSize.height != 0) { - layoutableShadowNode->setSize( + layoutableShadowNode.setSize( Size{stateData.frameSize.width, stateData.frameSize.height}); }