Changeset 98296 in vbox for trunk/src/VBox/Main/include/vector.h
- Timestamp:
- Jan 25, 2023 1:28:38 AM (23 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/include/vector.h
r98103 r98296 206 206 void *pvElement) 207 207 { 208 int rc2;209 208 AssertReturn(pvec->muTypeHash == uTypeHash, VERR_INVALID_PARAMETER); 210 if ( pvec->mcElements == pvec->mcCapacity 211 && RT_FAILURE((rc2 = VEC_EXPAND(pvec)))) 212 return rc2; 209 if (pvec->mcElements == pvec->mcCapacity) 210 { 211 int vrc2 = VEC_EXPAND(pvec); 212 if (RT_FAILURE(vrc2)) 213 return vrc2; 214 } 213 215 memcpy(VEC_GET_ELEMENT_OBJ(pvec->mpvaElements, pvec->mcbElement, 214 216 pvec->mcElements), pvElement, pvec->mcbElement); … … 221 223 void *pv) 222 224 { 223 int rc2;224 225 AssertReturn(pvec->muTypeHash == uTypeHash, VERR_INVALID_PARAMETER); 225 if ( pvec->mcElements == pvec->mcCapacity 226 && RT_FAILURE((rc2 = VEC_EXPAND(pvec)))) 227 return rc2; 226 if (pvec->mcElements == pvec->mcCapacity) 227 { 228 int vrc2 = VEC_EXPAND(pvec); 229 if (RT_FAILURE(vrc2)) 230 return vrc2; 231 } 228 232 VEC_GET_ELEMENT_PTR(pvec->mpvaElements, pvec->mcElements) = pv; 229 233 ++pvec->mcElements;
Note:
See TracChangeset
for help on using the changeset viewer.