On Wed, Aug 23, 2006 at 05:03:11PM +0200, Bastiaan Jacques wrote:
> What about:
>
> for (iterator it = _characters.begin(); it != _characters.end(); ++it) {
> // ..
> }
>
> ?
>
> This would save you a copy and (I believe) would be safer than the
> original.
If the container can change (as the comments suggest)
we need more info about "how" could it change, as I don't think
that testing for .end() would be enough to be "safe".
Copying the full list might actually be the "safest" approach.
BTW, I've verified in the past that testing for .end() or .size() and
friends in a for condition is actually slower then caching it in
the initializer.
--strk;
_______________________________________________
Gnash-commit mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/gnash-commit