removed wrong check from splice(it, list, first)
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2009 23:23:49 +0000 (23:23 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 7 Feb 2009 23:23:49 +0000 (23:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/list.h

index c917e02a2f5af6500fb742b42798d5cdbcda9a4f..3a261249eea9a88bdf9f04f01a1f52f8fcebacaa 100644 (file)
@@ -1047,10 +1047,11 @@ private:
             { splice(it, l, l.begin(), l.end() ); }                         \
         void splice(const iterator& it, name& l, const iterator& first)     \
         {                                                                   \
-            iterator tmp = first; ++tmp;                                    \
-            if(it == first || it == tmp) return;                            \
-            insert(it, *first);                                             \
-            l.erase(first);                                                 \
+            if ( it != first )                                              \
+            {                                                               \
+                insert(it, *first);                                         \
+                l.erase(first);                                             \
+            }                                                               \
         }                                                                   \
         void remove(const_reference v)                                      \
             { DeleteObject((const_base_reference)v); }                      \