X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a363af33bf35b1f3f8f4fd1142cf9dbb8fff9c09..289532452089421ddadbd4726a8469511a19ab76:/include/wx/dlist.h 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);