scummvm/scummvm — pull request #272 by MathiasBartl (2012-08-23 13:43:59+00:00)
Title: Common::List has a bidirectional reverse iterator.

Common::List.reverse_begin() did not work like in the STL, but did
return an bidirectional forward iterator pointing at the end of the
list,instead of an bidirectional reverse iterator pointing at the end of
the list.

Common::List.legacy_reverse_begin() works like the old reverse_begin()
did, for compitability, but is deprecated.

All code that previously used reverse_begin() uses
legacy_reverse_begin(), but works like before.

New code should not use legacy_reverse_begin().

Changes are for constant iterators as well as for iterators.

Common::List.reverse_begin() returns a bidirectional reverse iterator,
also constant bidirectional reverse iterator.

List.reverse_end() is functionally identical and interchangeable to
List.end().

List::Iterator, List::ConstIterator: reference to underlying List is
private. Small refactoring for oo code quality only.

Expands Testcases to cover all methods of List including the use of
reverse iterators as parameters.

Expands comments.

Fixes http://wiki.scummvm.org/index.php/TODO#Iterator_handling .
Reworks patch previously submitted at
https://sourceforge.net/tracker/index.php?func=detail&aid=3515308&group_id=37116&atid=418822
and https://github.com/scummvm/scummvm/pull/230 .