remove const from UIManager::createNode and UIManager::cloneNode

Summary:
changelog: [internal]

These shadow nodes are freshly created and unsealed. Return non-const.

Reviewed By: NickGerleman

Differential Revision: D50796024

fbshipit-source-id: 6e2a61bb03efbc6f63a489928787e645971780df
This commit is contained in:
Samuel Susla
2023-10-31 09:58:05 -07:00
committed by Facebook GitHub Bot
parent 475b835e43
commit ae85be3e92
4 changed files with 6 additions and 6 deletions
@@ -78,7 +78,7 @@ class ComponentDescriptor {
/*
* Creates a new `ShadowNode` of a particular component type.
*/
virtual ShadowNode::Shared createShadowNode(
virtual std::shared_ptr<ShadowNode> createShadowNode(
const ShadowNodeFragment& fragment,
const ShadowNodeFamily::Shared& family) const = 0;
@@ -63,7 +63,7 @@ class ConcreteComponentDescriptor : public ComponentDescriptor {
return ShadowNodeT::BaseTraits();
}
ShadowNode::Shared createShadowNode(
std::shared_ptr<ShadowNode> createShadowNode(
const ShadowNodeFragment& fragment,
const ShadowNodeFamily::Shared& family) const override {
auto shadowNode =
@@ -62,7 +62,7 @@ UIManager::~UIManager() {
<< ").";
}
ShadowNode::Shared UIManager::createNode(
std::shared_ptr<ShadowNode> UIManager::createNode(
Tag tag,
const std::string& name,
SurfaceId surfaceId,
@@ -109,7 +109,7 @@ ShadowNode::Shared UIManager::createNode(
return shadowNode;
}
ShadowNode::Shared UIManager::cloneNode(
std::shared_ptr<ShadowNode> UIManager::cloneNode(
const ShadowNode& shadowNode,
const ShadowNode::SharedListOfShared& children,
const RawProps* rawProps) const {
@@ -130,14 +130,14 @@ class UIManager final : public ShadowTreeDelegate {
const RootShadowNode::Shared& oldRootShadowNode,
const RootShadowNode::Unshared& newRootShadowNode) const override;
ShadowNode::Shared createNode(
std::shared_ptr<ShadowNode> createNode(
Tag tag,
const std::string& componentName,
SurfaceId surfaceId,
const RawProps& props,
const InstanceHandle::Shared& instanceHandle) const;
ShadowNode::Shared cloneNode(
std::shared_ptr<ShadowNode> cloneNode(
const ShadowNode& shadowNode,
const ShadowNode::SharedListOfShared& children = nullptr,
const RawProps* rawProps = nullptr) const;