X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a363af33bf35b1f3f8f4fd1142cf9dbb8fff9c09..2de77c6a543caf44069b275dd154d4fc692ad29d:/include/wx/dlist.h?ds=sidebyside 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);