From 729efd1077bf2c36c1870507cf7e1177f66a8458 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 7 Feb 2009 23:23:49 +0000 Subject: [PATCH] removed wrong check from splice(it, list, first) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@58740 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/list.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/wx/list.h b/include/wx/list.h index 9d043c77b2..d10177f700 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -1068,10 +1068,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); } \