- /* add 50% but not too much */ \
- size_t nIncrement = m_nSize < WX_ARRAY_DEFAULT_INITIAL_SIZE \
- ? WX_ARRAY_DEFAULT_INITIAL_SIZE : m_nSize >> 1; \
- if ( nIncrement > ARRAY_MAXSIZE_INCREMENT ) \
- nIncrement = ARRAY_MAXSIZE_INCREMENT; \
+ /* add at least 50% but not too much */ \
+ size_t ndefIncrement = m_nSize < WX_ARRAY_DEFAULT_INITIAL_SIZE \
+ ? WX_ARRAY_DEFAULT_INITIAL_SIZE : m_nSize >> 1; \
+ if ( ndefIncrement > ARRAY_MAXSIZE_INCREMENT ) \
+ ndefIncrement = ARRAY_MAXSIZE_INCREMENT; \
+ if ( nIncrement < ndefIncrement ) \
+ nIncrement = ndefIncrement; \