From eceb6af1586b7ec760bcbc1aca01ca59e4cd1711 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 9 Aug 2011 11:35:32 +0000 Subject: [PATCH] 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 --- src/generic/datavgen.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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); -- 2.47.2