| 1843 | } |
| 1844 | |
| 1845 | ResultType Array::SetLength(index_t aNewLength) |
| 1846 | { |
| 1847 | if (mLength > aNewLength) |
| 1848 | { |
| 1849 | RemoveAt(aNewLength, mLength - aNewLength); |
| 1850 | return OK; |
| 1851 | } |
| 1852 | if (aNewLength > mCapacity && !SetCapacity(aNewLength)) |
| 1853 | return FAIL; |
| 1854 | for (index_t i = mLength; i < aNewLength; ++i) |
| 1855 | { |
| 1856 | mItem[i].Minit(); |
| 1857 | } |
| 1858 | mLength = aNewLength; |
| 1859 | return OK; |
| 1860 | } |
| 1861 | |
| 1862 | Array::~Array() |
| 1863 | { |
nothing calls this directly
no test coverage detected