]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/list.h
avoid a bug in Carbon headers
[wxWidgets.git] / include / wx / list.h
index e5eef865c23f26dc1c23a9d6c3dead739f0a5928..ab36a45db25b2893f0666a6628f1c9cb19df69f1 100644 (file)
@@ -859,10 +859,10 @@ private:
             { return const_reverse_iterator(NULL, GetFirst()); }            \
         void resize(size_type n, value_type v = value_type())               \
         {                                                                   \
-            if(n < size())                                                  \
-                for(; n < size(); pop_back());                              \
-            else if(n > size())                                             \
-                for(; n > size(); push_back(v));                            \
+            while (n < size())                                              \
+                pop_back();                                                 \
+            while (n > size())                                              \
+                push_back(v);                                                \
         }                                                                   \
         size_type size() const { return GetCount(); }                       \
         size_type max_size() const { return INT_MAX; }                      \