X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f6bcfd974ef26faf6f91a62cac09827e09463fd1..1ec46a5b35233f3c69c5b73e4b0b36f44c650633:/include/wx/dynarray.h diff --git a/include/wx/dynarray.h b/include/wx/dynarray.h index 702df0bad0..321c49a94d 100644 --- a/include/wx/dynarray.h +++ b/include/wx/dynarray.h @@ -164,6 +164,7 @@ private: // { ((wxBaseArray *)this)->operator=((const wxBaseArray&)src); // so using a temporary variable instead. // ---------------------------------------------------------------------------- +// __MAC_X__ added min ~name() below for compiling Mac X #define _WX_DEFINE_ARRAY(T, name, classexp) \ typedef int (CMPFUNC_CONV *CMPFUNC##T)(T *pItem1, T *pItem2); \ classexp name : public wxBaseArray \ @@ -176,6 +177,7 @@ public: \ if ( type > sizelong ) \ { wxFAIL_MSG( _WX_ERROR_SIZEOF ); } \ } \ + ~name() {} \ \ name& operator=(const name& src) \ { wxBaseArray* temp = (wxBaseArray*) this; \ @@ -452,10 +454,10 @@ WX_DEFINE_EXPORTED_ARRAY(void *, wxArrayPtrVoid); // append all element of one array to another one #define WX_APPEND_ARRAY(array, other) \ { \ - size_t count = other.Count(); \ + size_t count = (other).Count(); \ for ( size_t n = 0; n < count; n++ ) \ { \ - array.Add(other[n]); \ + (array).Add((other)[n]); \ } \ } @@ -467,13 +469,13 @@ WX_DEFINE_EXPORTED_ARRAY(void *, wxArrayPtrVoid); // count on it)! #define WX_CLEAR_ARRAY(array) \ { \ - size_t count = array.Count(); \ + size_t count = (array).Count(); \ for ( size_t n = 0; n < count; n++ ) \ { \ - delete array[n]; \ + delete (array)[n]; \ } \ \ - array.Empty(); \ + (array).Empty(); \ } #endif // _DYNARRAY_H