Commit 928e0e5f authored by Lorenz Meier's avatar Lorenz Meier
Browse files

Merge pull request #12 from liamstask/shared_ptr_fix

plugins: use std::dynamic_pointer_cast rather than boost
parents e4bf8333 2ce086fc
...@@ -60,7 +60,7 @@ void RayPlugin::Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf) ...@@ -60,7 +60,7 @@ void RayPlugin::Load(sensors::SensorPtr _parent, sdf::ElementPtr _sdf)
{ {
// Get then name of the parent sensor // Get then name of the parent sensor
this->parentSensor = this->parentSensor =
boost::dynamic_pointer_cast<sensors::RaySensor>(_parent); std::dynamic_pointer_cast<sensors::RaySensor>(_parent);
if (!this->parentSensor) if (!this->parentSensor)
gzthrow("RayPlugin requires a Ray Sensor as its parent"); gzthrow("RayPlugin requires a Ray Sensor as its parent");
......
...@@ -56,12 +56,12 @@ void CameraPlugin::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf) ...@@ -56,12 +56,12 @@ void CameraPlugin::Load(sensors::SensorPtr _sensor, sdf::ElementPtr _sdf)
gzerr << "Invalid sensor pointer.\n"; gzerr << "Invalid sensor pointer.\n";
this->parentSensor = this->parentSensor =
boost::dynamic_pointer_cast<sensors::CameraSensor>(_sensor); std::dynamic_pointer_cast<sensors::CameraSensor>(_sensor);
if (!this->parentSensor) if (!this->parentSensor)
{ {
gzerr << "CameraPlugin requires a CameraSensor.\n"; gzerr << "CameraPlugin requires a CameraSensor.\n";
if (boost::dynamic_pointer_cast<sensors::DepthCameraSensor>(_sensor)) if (std::dynamic_pointer_cast<sensors::DepthCameraSensor>(_sensor))
gzmsg << "It is a depth camera sensor\n"; gzmsg << "It is a depth camera sensor\n";
} }
......
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