Changeset 37861 in vbox for trunk/include/VBox/com
- Timestamp:
- Jul 11, 2011 10:03:22 AM (14 years ago)
- Location:
- trunk/include/VBox/com
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/com/list.h
r37553 r37861 131 131 { 132 132 com::SafeArray<IN_BSTR> sfaOther(ComSafeArrayInArg(other)); 133 realloc _grow(sfaOther.size());133 realloc(sfaOther.size()); 134 134 m_cSize = sfaOther.size(); 135 135 for (size_t i = 0; i < m_cSize; ++i) … … 148 148 */ 149 149 RTCList(const com::SafeArray<IN_BSTR> &other) 150 : BASE(other.size()) 150 151 { 151 realloc_grow(other.size());152 m_cSize = other.size();153 152 for (size_t i = 0; i < m_cSize; ++i) 154 153 RTCListHelper<T, ITYPE>::set(m_pArray, i, T(other[i])); … … 168 167 /* Values cleanup */ 169 168 RTCListHelper<T, ITYPE>::eraseRange(m_pArray, 0, m_cSize); 170 171 169 /* Copy */ 172 170 if (other.size() != m_cCapacity) 173 realloc_ grow(other.size());171 realloc_no_elements_clean(other.size()); 174 172 m_cSize = other.size(); 175 173 for (size_t i = 0; i < other.size(); ++i) -
trunk/include/VBox/com/mtlist.h
r37068 r37861 131 131 { 132 132 com::SafeArray<IN_BSTR> sfaOther(ComSafeArrayInArg(other)); 133 realloc _grow(sfaOther.size());133 realloc(sfaOther.size()); 134 134 m_cSize = sfaOther.size(); 135 135 for (size_t i = 0; i < m_cSize; ++i) … … 148 148 */ 149 149 RTCMTList(const com::SafeArray<IN_BSTR> &other) 150 : BASE(other.size()) 150 151 { 151 realloc_grow(other.size());152 m_cSize = other.size();153 152 for (size_t i = 0; i < m_cSize; ++i) 154 153 RTCListHelper<T, ITYPE>::set(m_pArray, i, T(other[i])); … … 166 165 { 167 166 m_guard.enterWrite(); 168 /* Values cleanup */167 /* Values cleanup */ 169 168 RTCListHelper<T, ITYPE>::eraseRange(m_pArray, 0, m_cSize); 170 171 169 /* Copy */ 172 170 if (other.size() != m_cCapacity) 173 realloc_ grow(other.size());171 realloc_no_elements_clean(other.size()); 174 172 m_cSize = other.size(); 175 173 for (size_t i = 0; i < other.size(); ++i)
Note:
See TracChangeset
for help on using the changeset viewer.