]> git.saurik.com Git - wxWidgets.git/commitdiff
Fix compilation of generic wxDVC code when not using STL containers.
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 Aug 2011 14:09:37 +0000 (14:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 12 Aug 2011 14:09:37 +0000 (14:09 +0000)
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

index ea10aece5504a5376c2bd7ea60de041c7261792e..7a15a68e16a577229f1f74f80f01cff2c3fb7b49 100644 (file)
@@ -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 )