]> git.saurik.com Git - wxWidgets.git/commitdiff
switching to assert
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 2 Feb 2011 13:49:44 +0000 (13:49 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 2 Feb 2011 13:49:44 +0000 (13:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/list.h

index e6fd24d74b1529b405af474e275f97b339fd1e78..8f0c86f27618340bf300f52203f2e864a730fa6c 100644 (file)
@@ -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--()                                              \