[webkit-dev] Style: Vector::iterator vs indexed iteration

Adam Klein adamk at chromium.org
Mon Oct 17 14:48:25 PDT 2011

A small style question came up in a review today, and I was curious if
there's any consensus on this: when iterating over a WTF::Vector, does
WebKit style prefer using a size_t vs a Vector::iterator, or
vice-versa?  Both show up in WebCore, but the indexed style is more
common (by maybe a 5-1 ratio by my rough git grep estimation), which
at least suggests that it may be preferred.

- Adam

More information about the webkit-dev mailing list