From 728c62b66d3bb087c876fa821f7172581d48557c Mon Sep 17 00:00:00 2001 From: Mattia Barbon Date: Thu, 24 Jul 2003 19:33:59 +0000 Subject: [PATCH] Fixed wrong wxList::compatibility_iterator::GetPrevious. Added operator== and != for compatibility_iterator. Removed deprecation warning of wxStringList: until wxPathList is changed not to use wxStringList, having the warning is just annoying. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22278 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index 9d64eafea3..07be253125 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -119,6 +119,10 @@ enum wxKeyType compatibility_iterator() : m_list( NULL ) { } \ dummy* operator->() { return (dummy*)this; } \ const dummy* operator->() const { return (const dummy*)this; } \ + bool operator==(const compatibility_iterator& it) \ + { return m_list == it.m_list && m_iter == it.m_iter; } \ + bool operator!=(const compatibility_iterator& it) \ + { return m_list != it.m_list || m_iter != it.m_iter; } \ }; \ typedef struct compatibility_iterator citer; \ \ @@ -142,7 +146,7 @@ enum wxKeyType { \ citer* i = (citer*)this; \ it lit = i->m_iter; \ - return citer( i->m_list, ++lit ); \ + return citer( i->m_list, --lit ); \ } \ void SetData( elT e ) \ { \ @@ -1030,7 +1034,8 @@ class WXDLLIMPEXP_BASE wxList : public wxObjectList { public: #if defined(wxWARN_COMPAT_LIST_USE) && !wxUSE_STL - wxDEPRECATED( wxList(int key_type = wxKEY_NONE) ); + wxList() { }; + wxDEPRECATED( wxList(int key_type) ); #elif !wxUSE_STL wxList(int key_type = wxKEY_NONE); #endif @@ -1070,7 +1075,7 @@ public: // ctors and such // default #ifdef wxWARN_COMPAT_LIST_USE - wxDEPRECATED( wxStringList() ); + wxStringList(); wxDEPRECATED( wxStringList(const wxChar *first ...) ); #else wxStringList(); -- 2.45.2