Changeset 97946 in vbox for trunk/include/iprt/nocrt
- Timestamp:
- Jan 3, 2023 8:53:28 AM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 155037
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/nocrt/vector
r97821 r97946 4 4 5 5 /* 6 * Copyright (C) 202 2Oracle and/or its affiliates.6 * Copyright (C) 2023 Oracle and/or its affiliates. 7 7 * 8 8 * This file is part of VirtualBox base platform packages, as … … 120 120 /** @name Item access 121 121 * @{ */ 122 typenamereference operator*() const RT_NOEXCEPT122 reference operator*() const RT_NOEXCEPT 123 123 { 124 124 return *m_pItem; … … 229 229 ~vector() 230 230 { 231 size_type i = m_cItems; 232 while (i-- > 0) 233 { 234 m_Allocator.destroy(&m_paItems[i]); 235 m_cItems = i; 236 } 237 m_Allocator.deallocate(m_paItems, m_cAllocated); 238 m_paItems = NULL; 239 m_cAllocated = 0; 240 } 241 231 clear(); 232 } 242 233 243 234 /** @name Iterators … … 310 301 pointer data() RT_NOEXCEPT 311 302 { 312 return m_paItem ;303 return m_paItems; 313 304 } 314 305 315 306 const_pointer data() const RT_NOEXCEPT 316 307 { 317 return m_paItem ;308 return m_paItems; 318 309 } 319 310 … … 386 377 m_cItems -= 1; 387 378 } 388 /** @} */ 389 379 380 void clear() RT_NOEXCEPT 381 { 382 size_type i = m_cItems; 383 while (i-- > 0) 384 { 385 m_Allocator.destroy(&m_paItems[i]); 386 m_cItems = i; 387 } 388 m_Allocator.deallocate(m_paItems, m_cAllocated); 389 m_paItems = NULL; 390 m_cAllocated = 0; 391 } 392 /** @} */ 390 393 }; 391 394
Note:
See TracChangeset
for help on using the changeset viewer.