Home | History | Annotate | Download | only in libutils

Lines Matching full:where

123     void* where = _grow(index, length);
124 if (where) {
125 _do_copy(where, array, length);
127 return where ? index : (ssize_t)NO_MEMORY;
144 void* where = _grow(index, numItems);
145 if (where) {
147 _do_splat(where, item, numItems);
149 _do_construct(where, numItems);
152 return where ? index : (ssize_t)NO_MEMORY;
367 void* VectorImpl::_grow(size_t where, size_t amount)
369 // ALOGV("_grow(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
370 // this, (int)where, (int)amount, (int)mCount, (int)capacity());
372 ALOG_ASSERT(where <= mCount,
373 "[%p] _grow: where=%d, amount=%d, count=%d",
374 this, (int)where, (int)amount, (int)mCount); // caller already checked
381 (mCount==where) &&
392 if (where != 0) {
393 _do_copy(array, mStorage, where);
395 if (where != mCount) {
396 const void* from = reinterpret_cast<const uint8_t *>(mStorage) + where*mItemSize;
397 void* dest = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize;
398 _do_copy(dest, from, mCount-where);
406 if (where != mCount) {
407 const void* from = reinterpret_cast<const uint8_t *>(array) + where*mItemSize;
408 void* to = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize;
409 _do_move_forward(to, from, mCount - where);
413 void* free_space = const_cast<void*>(itemLocation(where));
417 void VectorImpl::_shrink(size_t where, size_t amount)
422 // ALOGV("_shrink(this=%p, where=%d, amount=%d) count=%d, capacity=%d",
423 // this, (int)where, (int)amount, (int)mCount, (int)capacity());
425 ALOG_ASSERT(where + amount <= mCount,
426 "[%p] _shrink: where=%d, amount=%d, count=%d",
427 this, (int)where, (int)amount, (int)mCount); // caller already checked
433 if ((where == new_size) &&
444 if (where != 0) {
445 _do_copy(array, mStorage, where);
447 if (where != new_size) {
448 const void* from = reinterpret_cast<const uint8_t *>(mStorage) + (where+amount)*mItemSize;
449 void* dest = reinterpret_cast<uint8_t *>(array) + where*mItemSize;
450 _do_copy(dest, from, new_size - where);
458 void* to = reinterpret_cast<uint8_t *>(array) + where*mItemSize;
460 if (where != new_size) {
461 const void* from = reinterpret_cast<uint8_t *>(array) + (where+amount)*mItemSize;
462 _do_move_backward(to, from, new_size - where);
600 // first take care of the case where the vectors are sorted together