X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b547eb0f86b29467df3ec562ad7a6443c6e34fa5..18e9c453ef4791c790af3898f556186c4b1226e5:/include/wx/list.h diff --git a/include/wx/list.h b/include/wx/list.h index aca713b04c..a93d2eca93 100644 --- a/include/wx/list.h +++ b/include/wx/list.h @@ -1007,7 +1007,10 @@ private: } \ iterator insert(const iterator& it, const_reference v) \ { \ - Insert(it.m_node, (const_base_reference)v); \ + if ( it == end() ) \ + Append((const_base_reference)v); \ + else \ + Insert(it.m_node, (const_base_reference)v); \ iterator itprev(it); \ return itprev--; \ } \ @@ -1017,7 +1020,7 @@ private: Insert(it.m_node, (const_base_reference)v); \ } \ void insert(const iterator& it, \ - const const_iterator& first, const const_iterator& last)\ + const_iterator first, const const_iterator& last) \ { \ for(; first != last; ++first) \ Insert(it.m_node, (const_base_reference)*first); \