Le 15/12/2010 18:51, Abdelrazak Younes a écrit :
It seems correct. At the time I remember saying to myself that using
std::distance was not optimal and that we should use some new fast
method in RandomAccessList but I did not bother because it was fast
enough. So it is not fast enough for this use case it seems :-)

And I remember that I never understood why we use this RandomAccessList
instead of a vectos<Component*> that masquerades as a vector<Component>.
IOW, what is the underlying std::list good for?

Looking at the code, I actually think we can get rid of the distance
call by using a for loop instead of while.

Agreed. Thanks for looking at it.

JMarc

Reply via email to