← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 1781: A flag "neverErase" is added to the contact law to define if it can

 

Václav Šmilauer a écrit :
-       virtual void go(shared_ptr<InteractionGeometry>& _geom,
shared_ptr<InteractionPhysics>& _phys, Interaction* I, MetaBody*
rootBody);
+       virtual void go(shared_ptr<InteractionGeometry>& _geom,
shared_ptr<InteractionPhysics>& _phys, Interaction* I, MetaBody*
rootBody, bool neverErase=false);

Eh, you changed prototype of a virtual method, which means that the new
one will never be called, right? (since it is no longer an override of
the original ::go, but an overloaded method). Did you check the
functionality? And what is the use passing that to the functor, instead
of just changing the class member?

After this commit, I was wondering myself why I didn't just put the flag into the functor directly instead of passing it all the time. You are right, there is no need to do that, though it works well apparently (I guess the new method is used as long as you pass the last argument. If you don't, well, you hit a bug...).

Thanks for the advice. I'll fix that.

Bruno
v


_______________________________________________
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
Maître de Conférences

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
________________




References