Changeset 73968 in vbox for trunk/src/VBox/Runtime/common/rest/RTCRestArrayBase.cpp
- Timestamp:
- Aug 29, 2018 7:32:50 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/RTCRestArrayBase.cpp
r73965 r73968 310 310 311 311 if (a_idx == ~(size_t)0) 312 a_idx = m_cElements - 1;312 a_idx = m_cElements; 313 313 314 314 if (a_idx <= m_cElements) … … 333 333 m_papElements[a_idx] = a_pValue; 334 334 m_cElements++; 335 } 336 else 337 { 338 /* Replace element. */ 339 delete m_papElements[a_idx]; 340 m_papElements[a_idx] = a_pValue; 341 return VWRN_ALREADY_EXISTS; 342 } 335 return VINF_SUCCESS; 336 } 337 338 /* Replace element. */ 339 delete m_papElements[a_idx]; 340 m_papElements[a_idx] = a_pValue; 341 return VWRN_ALREADY_EXISTS; 343 342 } 344 343 return VERR_OUT_OF_RANGE;
Note:
See TracChangeset
for help on using the changeset viewer.