/[svn]/linuxsampler/trunk/src/common/ArrayList.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/ArrayList.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2580 by schoenebeck, Fri Jan 10 12:20:05 2014 UTC revision 2581 by schoenebeck, Fri May 30 12:48:05 2014 UTC
# Line 90  namespace LinuxSampler { Line 90  namespace LinuxSampler {
90              }              }
91    
92              /**              /**
93                 * Increase or decrease the size of this list to the new amount of
94                 * elements given by \a cnt.
95                 */
96                void resize(int cnt) {
97                    T* pNewArray = new T[cnt];
98                    if (pData) {
99                        for (int i = 0; i < cnt; i++)
100                            pNewArray[i] = pData[i];
101                        delete[] pData;
102                    }
103                    pData = pNewArray;
104                    iSize = cnt;
105                }
106    
107                /**
108               * Remove all elements from the list.               * Remove all elements from the list.
109               */               */
110              void clear() {              void clear() {

Legend:
Removed from v.2580  
changed lines
  Added in v.2581

  ViewVC Help
Powered by ViewVC