]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dlist.h
Build fix for wxOSX after removing position in MacCreateKeyEvent().
[wxWidgets.git] / include / wx / dlist.h
index 3e43cb83076c545c0d35390c639fe41bca7401db..b69f617d9bc2075aa28376cdd38f7c2a386a027b 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        dlist.h
+// Name:        wx/dlist.h
 // Purpose:     wxDList<T> which is a template version of wxList
 // Author:      Robert Roebling
 // Created:     18.09.2008
@@ -13,7 +13,7 @@
 #include "wx/defs.h"
 #include "wx/utils.h"
 
-#if wxUSE_STL
+#if wxUSE_STD_CONTAINERS
 
 #include "wx/beforestd.h"
 #include <algorithm>
@@ -199,7 +199,7 @@ public:
     }
 };
 
-#else  // STL
+#else  // !wxUSE_STD_CONTAINERS
 
 template <typename T>
 class wxDList
@@ -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);
@@ -842,6 +845,6 @@ public:
     } */
 };
 
-#endif // wxUSE_STL/!wxUSE_STL
+#endif // wxUSE_STD_CONTAINERS/!wxUSE_STD_CONTAINERS
 
 #endif // _WX_DLIST_H_