]> git.saurik.com Git - wxWidgets.git/commitdiff
silence GCC warning "enumeral and non-enumeral type in conditional expression"
authorPaul Cornett <paulcor@bullseye.com>
Sat, 24 Nov 2012 21:49:04 +0000 (21:49 +0000)
committerPaul Cornett <paulcor@bullseye.com>
Sat, 24 Nov 2012 21:49:04 +0000 (21:49 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/vector.h

index 74dcbf4080a0686168fae955646f2cdf767b04fd..f2f337fae9492a350c8c529b18c15f407db24884 100644 (file)
@@ -241,12 +241,12 @@ public:
         // increase the size twice, unless we're already too big or unless
         // more is requested
         //
-        // NB: casts to size_type are needed to suppress mingw32 warnings about
-        //     mixing enums and ints in the same expression
+        // NB: casts to size_type are needed to suppress warnings about
+        //     mixing enumeral and non-enumeral type in conditional expression
         const size_type increment = m_size > 0
                                      ? m_size < ALLOC_MAX_SIZE
                                         ? m_size
-                                        : ALLOC_MAX_SIZE
+                                        : (size_type)ALLOC_MAX_SIZE
                                      : (size_type)ALLOC_INITIAL_SIZE;
         if ( m_capacity + increment > n )
             n = m_capacity + increment;