Parent Directory | Revision Log | 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() { |
|
ViewVC Help | |
Powered by ViewVC |