]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed WX_APPEND_ARRAY and WX_CLEAR_ARRAY when used with dereferenced pointers (*array)
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 20 May 2001 11:56:20 +0000 (11:56 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 20 May 2001 11:56:20 +0000 (11:56 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dynarray.h

index c72a62f6366609ef040d22090a33378a5b7ec508..321c49a94deb1c15669a757ab9fe9a2fc9435769 100644 (file)
@@ -454,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]);                                          \
         }                                                                     \
     }
 
@@ -469,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