- Timestamp:
- Apr 28, 2011, 7:15:14 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/external/bullet/LinearMath/btAlignedObjectArray.h
r5781 r8351 139 139 } 140 140 141 SIMD_FORCE_INLINE const T& at(int n) const 142 { 143 return m_data[n]; 144 } 145 146 SIMD_FORCE_INLINE T& at(int n) 147 { 148 return m_data[n]; 149 } 150 141 151 SIMD_FORCE_INLINE const T& operator[](int n) const 142 152 { … … 172 182 int curSize = size(); 173 183 174 if (newsize < size())175 { 176 for(int i = curSize; i < newsize; i++)184 if (newsize < curSize) 185 { 186 for(int i = newsize; i < curSize; i++) 177 187 { 178 188 m_data[i].~T(); … … 196 206 } 197 207 208 SIMD_FORCE_INLINE T& expandNonInitializing( ) 209 { 210 int sz = size(); 211 if( sz == capacity() ) 212 { 213 reserve( allocSize(size()) ); 214 } 215 m_size++; 216 217 return m_data[sz]; 218 } 219 198 220 199 221 SIMD_FORCE_INLINE T& expand( const T& fillValue=T()) … … 438 460 } 439 461 462 void copyFromArray(const btAlignedObjectArray& otherArray) 463 { 464 int otherSize = otherArray.size(); 465 resize (otherSize); 466 otherArray.copy(0, otherSize, m_data); 467 } 468 440 469 }; 441 470
Note: See TracChangeset
for help on using the changeset viewer.