]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/list.h
rename various gsock* files to sock* (except for MSW where this will be done later)
[wxWidgets.git] / include / wx / list.h
index aca713b04c0f0e9f3c8bfa04b9f011f4ab7ff388..5f9b4d1fa0e25404f6cefb1c57c42325a62f39e0 100644 (file)
@@ -457,7 +457,7 @@ protected:
     virtual void DeleteData() { }
 public:
     // for wxList::iterator
-    void** GetDataPtr() const { return &(wx_const_cast(wxNodeBase*, this)->m_data); }
+    void** GetDataPtr() const { return &(const_cast<wxNodeBase*>(this)->m_data); }
 private:
     // optional key stuff
     wxListKeyValue m_key;
@@ -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);            \