]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't include wx/utils.h from wx/vector.h.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Nov 2012 17:36:19 +0000 (17:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 24 Nov 2012 17:36:19 +0000 (17:36 +0000)
This will allow to include wx/vector.h from wx/list.h which is itself included
from wx/utils.h by breaking this circular dependency.

Don't use wxMin(), defined in wx/utils.h, in order to do this.

See #14814.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/vector.h

index d558e774e603357e8a46623b21c2e7ff0f3318a1..74dcbf4080a0686168fae955646f2cdf767b04fd 100644 (file)
@@ -28,7 +28,6 @@ inline void wxVectorSort(wxVector<T>& v)
 
 #else // !wxUSE_STD_CONTAINERS
 
-#include "wx/utils.h"
 #include "wx/scopeguard.h"
 #include "wx/meta/movable.h"
 #include "wx/meta/if.h"
@@ -245,7 +244,9 @@ public:
         // NB: casts to size_type are needed to suppress mingw32 warnings about
         //     mixing enums and ints in the same expression
         const size_type increment = m_size > 0
-                                     ? wxMin(m_size, (size_type)ALLOC_MAX_SIZE)
+                                     ? m_size < ALLOC_MAX_SIZE
+                                        ? m_size
+                                        : ALLOC_MAX_SIZE
                                      : (size_type)ALLOC_INITIAL_SIZE;
         if ( m_capacity + increment > n )
             n = m_capacity + increment;