[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re[2]: [lmi] wxWindowList::compatibility_iterator
From: |
Vadim Zeitlin |
Subject: |
Re[2]: [lmi] wxWindowList::compatibility_iterator |
Date: |
Wed, 30 Nov 2005 14:25:36 +0100 |
On Wed, 30 Nov 2005 05:47:45 +0000 Greg Chicares <address@hidden> wrote:
GC> Oh...it's really easy: instead of
GC>
GC> wxWindowList::compatibility_iterator node;
GC> for
GC> (node = GetChildren().GetFirst()
GC> ;node
GC> ;node = node->GetNext()
GC> )
GC> {
GC> wxWindow* w = node->GetData();
GC> ...
GC>
GC> just write
GC>
GC> for
GC> (wxWindowList::const_iterator node = GetChildren().begin()
GC> ;node != GetChildren().end()
GC> ;++node
GC> )
GC> {
GC> wxWindow* w = *node;
GC> ...
Indeed. compatibility_iterator only exists to simplify transition from the
old code (operating with wxNodes), new code should use STL-compatible (and,
in case of wxUSE_STL=1, even just STL) interface.
Regards,
VZ