Changeset 36526 in vbox for trunk/include
- Timestamp:
- Apr 4, 2011 1:03:14 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/cpp/list.h
r36524 r36526 178 178 */ 179 179 typedef typename if_ptr<ITYPE, T&, T>::result GET_RTYPE; 180 typedef typename if_ptr<ITYPE, const T&, const T>::result GET_CRTYPE; 180 181 181 182 public: … … 410 411 * @return The first item. 411 412 */ 412 const GET_RTYPE first() const413 { 414 m_guard.enterRead(); 415 const GET_RTYPE res = ListHelper<T, ITYPE>::at(m_pArray, 0);413 GET_CRTYPE first() const 414 { 415 m_guard.enterRead(); 416 GET_CRTYPE res = ListHelper<T, ITYPE>::at(m_pArray, 0); 416 417 m_guard.leaveRead(); 417 418 return res; … … 442 443 * @return The last item. 443 444 */ 444 const GET_RTYPE last() const445 { 446 m_guard.enterRead(); 447 const GET_RTYPE res = ListHelper<T, ITYPE>::at(m_pArray, m_cSize - 1);445 GET_CRTYPE last() const 446 { 447 m_guard.enterRead(); 448 GET_CRTYPE res = ListHelper<T, ITYPE>::at(m_pArray, m_cSize - 1); 448 449 m_guard.leaveRead(); 449 450 return res; … … 475 476 * @return The item at position @a i. 476 477 */ 477 const GET_RTYPE at(size_t i) const478 { 479 m_guard.enterRead(); 480 const GET_RTYPE res = ListHelper<T, ITYPE>::at(m_pArray, i);478 GET_CRTYPE at(size_t i) const 479 { 480 m_guard.enterRead(); 481 GET_CRTYPE res = ListHelper<T, ITYPE>::at(m_pArray, i); 481 482 m_guard.leaveRead(); 482 483 return res;
Note:
See TracChangeset
for help on using the changeset viewer.