silence GCC warning "enumeral and non-enumeral type in conditional expression"

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2012-11-24 21:49:04 +00:00
parent 93d0805b35
commit da63066b65

View 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;