]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/dynarray.cpp
No real changes, just avoid unnecessary string operations in wxSVGFileDCImpl.
[wxWidgets.git] / src / common / dynarray.cpp
index 175fa4a36e30522d6e5615a9b5839151009025ad..0f556decb500d14f799701da81c8edf15cd82032 100644 (file)
@@ -158,13 +158,13 @@ void name::Grow(size_t nIncrement)                                          \
   if( (m_nCount == m_nSize) || ((m_nSize - m_nCount) < nIncrement) ) {      \
     if( m_nSize == 0 ) {                                                    \
       /* was empty, determine initial size */                               \
-      size_t size = WX_ARRAY_DEFAULT_INITIAL_SIZE;                          \
-      if (size < nIncrement) size = nIncrement;                             \
+      size_t sz = WX_ARRAY_DEFAULT_INITIAL_SIZE;                            \
+      if (sz < nIncrement) sz = nIncrement;                                 \
       /* allocate some memory */                                            \
-      m_pItems = new T[size];                                               \
+      m_pItems = new T[sz];                                                 \
       /* only grow if allocation succeeded */                               \
       if ( m_pItems ) {                                                     \
-          m_nSize = size;                                                   \
+          m_nSize = sz;                                                     \
       }                                                                     \
     }                                                                       \
     else                                                                    \
@@ -359,7 +359,7 @@ void name::insert(iterator it, const_iterator first, const_iterator last)   \
   Grow(nInsert);                                                            \
                                                                             \
   /* old iterator could have been invalidated by Grow(). */                 \
-  it = begin() + nInsert;                                                   \
+  it = begin() + nIndex;                                                    \
                                                                             \
   memmove(&m_pItems[nIndex + nInsert], &m_pItems[nIndex],                   \
           (m_nCount - nIndex)*sizeof(T));                                   \