From 7fa920cd396ca478b425cf6d852172969bf3aa69 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Tue, 14 Oct 2008 09:43:53 +0000 Subject: [PATCH] Also correct wxDList git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@56302 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/dlist.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/include/wx/dlist.h b/include/wx/dlist.h index 3e43cb8307..0389d830d4 100644 --- a/include/wx/dlist.h +++ b/include/wx/dlist.h @@ -789,13 +789,16 @@ public: for(size_type i = 0; i < n; ++i) Append(v); } - iterator insert(const iterator& it, const_reference v = value_type()) + iterator insert(const iterator& it, const_reference v) { - Insert(it.m_node,v); + if (it == end()) + Append( v ); + else + Insert(it.m_node,v); iterator itprev(it); return itprev--; } - void insert(const iterator& it, size_type n, const_reference v = value_type()) + void insert(const iterator& it, size_type n, const_reference v) { for(size_type i = 0; i < n; ++i) Insert(it.m_node, v); -- 2.50.0