From f67a33e3adc84e606ed251256102fc125c6a138a Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Wed, 2 Feb 2011 13:49:44 +0000 Subject: [PATCH] switching to assert git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index e6fd24d74b..8f0c86f276 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -821,15 +821,15 @@ private: ptrop \ itor& operator++() \ { \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return *this; \ } \ const itor operator++(int) \ { \ itor tmp = *this; \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return tmp; \ } \ itor& operator--() \ @@ -874,15 +874,15 @@ private: ptrop \ itor& operator++() \ { \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return *this; \ } \ const itor operator++(int) \ { \ itor tmp = *this; \ - if (m_node) \ - m_node = m_node->GetNext(); \ + wxASSERT_MSG( m_node, wxT("uninitialized iterator") ); \ + m_node = m_node->GetNext(); \ return tmp; \ } \ itor& operator--() \