[Webkit-unassigned] [Bug 28455] ThreadTimer: avoid blocking UI when too many timers ready to fire
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Aug 19 17:23:35 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=28455
--- Comment #7 from Darin Adler <darin at apple.com> 2009-08-19 17:23:31 PDT ---
> I agree with the rest of your suggestions. but for this one I think using
> iterator (or const_iterator) should be better.
>
> First, "iterator" is kind of standard way for enumerating a C++ container.
>
> typedef Vector<some type> MyContainerType;
>
> for (MyContainerType::const_iterator i = container.begin(); i !=
> container.end(); ++i) {
> }
>
> If someday you change the container type from Vector to List, you don't have to
> change the code that enumerates the container.
I don't agree. I am aware that using iterators lets you use the same code on
Vector and List. I find the code using indices much easier to read and have
never had an experience where I had to change code from Vector to List.
I do find it useful for generic code that works on, say, both Vector and List.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list