Skip to content

Commit

Permalink
Pass shared_ptr as reference to const
Browse files Browse the repository at this point in the history
  • Loading branch information
codereader committed Apr 30, 2022
1 parent b78b492 commit 08f0250
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/inode.h
Expand Up @@ -263,9 +263,9 @@ class INode :

/// Cast an INode to a particular interface
template<typename Interface>
std::shared_ptr<Interface> node_cast(INodePtr nodeP)
std::shared_ptr<Interface> node_cast(const INodePtr& node)
{
return std::dynamic_pointer_cast<Interface>(nodeP);
return std::dynamic_pointer_cast<Interface>(node);
}

} // namespace scene

0 comments on commit 08f0250

Please sign in to comment.