[SimGrid-user] Rép : Re: Dynar issues

Christophe ENDERLIN c.enderlin at me.com
Wed Feb 13 08:55:05 CET 2013



Le 13 fév 2013 à 01:03, Martin Quinson <martin.quinson at loria.fr> a écrit :

> On Wed, Feb 13, 2013 at 12:15:54AM +0100, Arnaud Giersch wrote:
>
> > No, they are not.
> >
> > In the former, you are comparing the objects the pointers point to,
> > while in the latter, you are comparing the pointer values (i.e. the
> > memory addresses).
>
> In addition, you could break your foreach loop when you find your
> value, there is no need to completely traverse it. Just use the break
> keyword (or return) for that.
>
> Cheers, Mt.
 
Yes, thanks for the tip. I didn't think of using that instruction in a xbt_dynar_foreach loop.

Cheers,

Christophe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/simgrid-user/attachments/20130213/8f1ea5cf/attachment.html>


More information about the Simgrid-user mailing list