Skip to content

Commit

Permalink
remove const from UIManager::createNode and UIManager::cloneNode
Browse files Browse the repository at this point in the history
Summary:
changelog: [internal]

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

Reviewed By: NickGerleman

Differential Revision: D50796024

fbshipit-source-id: 6e2a61bb03efbc6f63a489928787e645971780df
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Oct 31, 2023
1 parent 475b835 commit ae85be3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ UIManager::~UIManager() {
<< ").";
}

ShadowNode::Shared UIManager::createNode(
std::shared_ptr<ShadowNode> UIManager::createNode(
Tag tag,
const std::string& name,
SurfaceId surfaceId,
Expand Down Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ae85be3

Please sign in to comment.