← Back to team overview

yade-dev team mailing list archive

Re: [Branch ~yade-dev/yade/trunk] Rev 2275: Fix of https://bugs.launchpad.net/yade/+bug/589516 (sorry, the compilation did not crash on my co...

 



Le 04/06/2010 11:05, Václav Šmilauer a écrit :
-			vector<shared_ptr<Engine>  >::iterator itFirst = scene->engines.begin();
-			vector<shared_ptr<Engine>  >::iterator itLast = scene->engines.end();
-			for ( ;itFirst!=itLast; ++itFirst )
-			{
Use

	FOREACH(const shared_ptr<Engine>&  e, scene->engines){...}

that will make your code a lot more readable.

Thanks for this remark. But in fact these lines will probably disappear because their goal was to identify which contact law is used. And now it is a functor, it can not anymore be done by looping over engines. I have to focus on interactions now, but I'll have to think what's the best (loop over all interactions ? pick one ?)



References