From: Václav Slavík Date: Tue, 9 Aug 2011 11:35:32 +0000 (+0000) Subject: Don't use iterators with wxDataViewSelection. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/eceb6af1586b7ec760bcbc1aca01ca59e4cd1711 Don't use iterators with wxDataViewSelection. They aren't implemented when using wx's homegrown sorted containers and adding support is probably more trouble than it's worth. Fixes #13388. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index 4573c9bb78..167c1149b8 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -4429,11 +4429,10 @@ int wxDataViewCtrl::GetSelections( wxDataViewItemArray & sel ) const sel.Empty(); wxDataViewSelection selection = m_clientArea->GetSelections(); - for ( wxDataViewSelection::const_iterator i = selection.begin(); - i != selection.end(); - ++i ) + const size_t len = selection.size(); + for ( size_t i = 0; i < len; i++ ) { - wxDataViewItem item = m_clientArea->GetItemByRow(*i); + wxDataViewItem item = m_clientArea->GetItemByRow(selection[i]); if ( item.IsOk() ) { sel.Add(item);