]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dynarray.h
Removed unnecessary code from utilsunx.cpp
[wxWidgets.git] / include / wx / dynarray.h
index 07f3f673bf1da214d9e4722c44af7568aa8ae861..109a89437c2b079649c3f23a2c402c470c8bb685 100644 (file)
@@ -308,7 +308,7 @@ public:                                                             \
                                                                     \
   T*   Detach(size_t uiIndex)                                       \
     { T* p = (T*)wxBaseArray::Item(uiIndex);                        \
-      wxBaseArray::Remove(uiIndex); return p; }                     \
+      wxBaseArray::RemoveAt(uiIndex); return p; }                   \
   void Remove(size_t uiIndex) { RemoveAt(uiIndex); }                \
   void RemoveAt(size_t uiIndex);                                    \
                                                                     \
@@ -448,6 +448,16 @@ WX_DEFINE_EXPORTED_ARRAY(void *, wxArrayPtrVoid);
 // convinience macros
 // -----------------------------------------------------------------------------
 
+// append all element of one array to another one
+#define WX_APPEND_ARRAY(array, other)                                         \
+    {                                                                         \
+        size_t count = other.Count();                                         \
+        for ( size_t n = 0; n < count; n++ )                                  \
+        {                                                                     \
+            array.Add(other[n]);                                              \
+        }                                                                     \
+    }
+
 // delete all array elements
 //
 // NB: the class declaration of the array elements must be visible from the