From 3823a15e2c3f6a72da36df4628ea16d0d40fbebf Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 12 Aug 2011 14:09:37 +0000 Subject: [PATCH] Fix compilation of generic wxDVC code when not using STL containers. wx sorted containers don't implement iterators so use indices to iterate over wxDataViewMainWindow::m_selection, just as r68613 already did in another place. Closes #13388. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68651 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 ea10aece55..7a15a68e16 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -2108,11 +2108,10 @@ bool wxDataViewMainWindow::ItemDeleted(const wxDataViewItem& parent, wxDataViewSelection newsel(wxDataViewSelectionCmp); - for ( wxDataViewSelection::const_iterator i = m_selection.begin(); - i != m_selection.end(); - ++i ) + const size_t numSelections = m_selection.size(); + for ( size_t i = 0; i < numSelections; ++i ) { - const int s = *i; + const int s = m_selection[i]; if ( s < itemRow ) newsel.push_back(s); else if ( s >= itemRow + itemsDeleted ) -- 2.45.2