#endif
#include "wx/dynarray.h"
+#include <wx/intl.h>
#include <stdlib.h>
#include <string.h> // for memmove
else
{
// add 50% but not too much
- uint uiIncrement = m_uiSize >> 1;
+ uint uiIncrement = m_uiSize < WX_ARRAY_DEFAULT_INITIAL_SIZE
+ ? WX_ARRAY_DEFAULT_INITIAL_SIZE : m_uiSize >> 1;
if ( uiIncrement > ARRAY_MAXSIZE_INCREMENT )
uiIncrement = ARRAY_MAXSIZE_INCREMENT;
m_uiSize += uiIncrement;
// add item at the given position
void wxBaseArray::Insert(long lItem, uint uiIndex)
{
- wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Insert" );
+ wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Insert") );
Grow();
// removes item from array (by index)
void wxBaseArray::Remove(uint uiIndex)
{
- wxCHECK_RET( uiIndex <= m_uiCount, "bad index in wxArray::Remove" );
+ wxCHECK_RET( uiIndex <= m_uiCount, _("bad index in wxArray::Remove") );
memmove(&m_pItems[uiIndex], &m_pItems[uiIndex + 1],
(m_uiCount - uiIndex - 1)*sizeof(long));
int iIndex = Index(lItem);
wxCHECK_RET( iIndex != NOT_FOUND,
- "removing inexistent item in wxArray::Remove" );
+ _("removing inexistent item in wxArray::Remove") );
Remove((uint)iIndex);
}