Fix to remove CW/Mac warning
authorJulian Smart <julian@anthemion.co.uk>
Tue, 19 Aug 2003 12:37:36 +0000 (12:37 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Tue, 19 Aug 2003 12:37:36 +0000 (12:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23013 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/list.h

index e5eef865c23f26dc1c23a9d6c3dead739f0a5928..c17823a71baafdf0974d3ad7afef47b4630da84f 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();                                                \
         }                                                                   \
         size_type size() const { return GetCount(); }                       \
         size_type max_size() const { return INT_MAX; }                      \