yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #01389
Re: [svn] r1837 - trunk/pkg/dem/Engine/DeusExMachina
> + PhysicalParameters* p_bottom = static_cast<PhysicalParameters*>((*bodies)[wall_bottom_id]->physicalParameters.get());
> + PhysicalParameters* p_top = static_cast<PhysicalParameters*>((*bodies)[wall_top_id]->physicalParameters.get());
> + PhysicalParameters* p_left = static_cast<PhysicalParameters*>((*bodies)[wall_left_id]->physicalParameters.get());
> + PhysicalParameters* p_right = static_cast<PhysicalParameters*>((*bodies)[wall_right_id]->physicalParameters.get());
> + PhysicalParameters* p_front = static_cast<PhysicalParameters*>((*bodies)[wall_front_id]->physicalParameters.get());
> + PhysicalParameters* p_back = static_cast<PhysicalParameters*>((*bodies)[wall_back_id]->physicalParameters.get());
I think you don't have to cast those, as physicalParameters are already
of type shared_ptr<PhysicalParameters>.
PhysicalParameters* p_bottom=(*bodies)[wall_bottom_id]->physicalParameters.get();
should just work IMHO.
Follow ups
References