← Back to team overview

yade-dev team mailing list archive

Re: [svn] r1837 - trunk/pkg/dem/Engine/DeusExMachina

 

Ah, you are right... I just copy/pasted that.
Anyway, static_cast is just an information for the compiler, corresponding to exactly 0 cpu time, isn't it?

Bruno


Václav Šmilauer a écrit :
+	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.



_______________________________________________
Mailing list: https://launchpad.net/~yade-dev
Post to     : yade-dev@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~yade-dev
More help   : https://help.launchpad.net/ListHelp




--

_______________
Chareyre Bruno
Maitre de conference

Grenoble INP
Laboratoire 3SR - bureau E145
BP 53 - 38041, Grenoble cedex 9 - France
Tél : 33 4 56 52 86 21
Fax : 33 4 76 82 70 43
________________




Follow ups

References