X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1cffe60012775e72f630a846b88c5b20e9fb9f26..3f434666bf9476e7fc6c27de94075211db5f1417:/include/wx/vector.h diff --git a/include/wx/vector.h b/include/wx/vector.h index 8cb76a7ee6..2c645a0107 100644 --- a/include/wx/vector.h +++ b/include/wx/vector.h @@ -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; @@ -204,7 +207,7 @@ private: #if WXWIN_COMPATIBILITY_2_8 template -typename wxVector::size_type wxVector::erase(size_type n) +inline typename wxVector::size_type wxVector::erase(size_type n) { erase(begin() + n); return n;