]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/vector.h
check that the version of __sync_sub_and_fetch that returns a value is supported...
[wxWidgets.git] / include / wx / vector.h
index 8cb76a7ee66f9f04fe5b3272b31d1a99535111f8..6fc0be174a40fdbcca64f096570466fd40fca84e 100644 (file)
@@ -59,9 +59,12 @@ public:
 
         // increase the size twice, unless we're already too big or unless
         // more is requested
-        const size_type increment = (m_size > 0)
-                                     ? wxMin(m_size, ALLOC_MAX_SIZE)
-                                     : ALLOC_INITIAL_SIZE;
+        //
+        // NB: casts to size_t 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)
+                                     : (size_type)ALLOC_INITIAL_SIZE;
         if ( m_capacity + increment > n )
             n = m_capacity + increment;