Commit 367857dd authored by Nghia Truong's avatar Nghia Truong

ENH: Small optimization for accessing colliding object (change return type...

ENH: Small optimization for accessing colliding object (change return type smart pointer to const reference)
parent 1ec0fe1d
......@@ -23,14 +23,14 @@
namespace imstk
{
std::shared_ptr<Geometry>
const std::shared_ptr<Geometry>&
CollidingObject::getCollidingGeometry() const
{
return m_collidingGeometry;
}
void
CollidingObject::setCollidingGeometry(std::shared_ptr<Geometry> geometry)
CollidingObject::setCollidingGeometry(const std::shared_ptr<Geometry>& geometry)
{
m_collidingGeometry = geometry;
}
......
......@@ -55,8 +55,8 @@ public:
///
/// \brief
///
std::shared_ptr<Geometry> getCollidingGeometry() const;
void setCollidingGeometry(std::shared_ptr<Geometry> geometry);
const std::shared_ptr<Geometry>& getCollidingGeometry() const;
void setCollidingGeometry(const std::shared_ptr<Geometry>& geometry);
///
/// \brief Get the master geometry
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment