Abdelrazak Younes <[EMAIL PROTECTED]> writes:
> >     /**
> > -   \todo This could be optimized a bit by rebuilding ItVector
> > -         instead of multiple deletion.
> > +   TODO: use std::remove_if and vector<>::erase, passing the
> 
> You don't like '\todo'? Doxygen recognize it and generates a nice TODO list.

No, I was pointing out HOW I'd go about implementing the TODO. std::remove_if
doesn't actually remove anything from the vector. It simply rearranges the
contents so that the stuff to be removed is all at the end, making it trivial
(and cheap) to then used "itVector_.erase(it, itVector_.end());" to resize the
vector. (it here is the iterator returned by std::remove_if). You just need to
write the predicate that would actually flag up elements for removal.

Angus

> > +   same predicate to remove_if as is used by erase(size_t);
> > +   Refactor the other erase() member funtions to use this predicate
> > +   also?
> 
> To be investigated...
> 
> Thanks,
> Abdel.




Reply via email to