Skip to content

Commit

Permalink
Fabric: Add proper type to TargetState
Browse files Browse the repository at this point in the history
Summary:
There isn't a need for using `std::shared_ptr<const void>` as the type is known.

changelog: [internal]

Reviewed By: shergin

Differential Revision: D18032518

fbshipit-source-id: 7860f9be8ba1a05a725e8bf7260a496d51194f2f
  • Loading branch information
sammy-SC authored and facebook-github-bot committed Oct 21, 2019
1 parent 7e49cf1 commit 75b9f9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ReactCommon/fabric/core/state/StateTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ StateTarget::operator bool() const {

const ShadowNode &StateTarget::getShadowNode() const {
assert(shadowNode_ && "Stored pointer to a ShadowNode must not be null.");
return *std::static_pointer_cast<const ShadowNode>(shadowNode_);
return *shadowNode_;
}

} // namespace react
Expand Down
2 changes: 1 addition & 1 deletion ReactCommon/fabric/core/state/StateTarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class StateTarget {
const ShadowNode &getShadowNode() const;

private:
std::shared_ptr<const void> shadowNode_;
std::shared_ptr<ShadowNode const> shadowNode_;
};

} // namespace react
Expand Down

0 comments on commit 75b9f9d

Please sign in to comment.