void APSizedArrayBase<_ElementType>::free_all( uint32_t pos, uint32_t elem_count // = ALength_remainder ) { if (elem_count == ALength_remainder) { elem_count = this->m_count - pos; } if (elem_count) { APARRAY_BOUNDS_CHECK_SPAN(pos, elem_count); _ElementType ** array_p = this->m_array_p + pos; // for faster than data member access _ElementType ** array_end_p = array_p + elem_count; for (; array_p < array_end_p; array_p++) { delete (*array_p); } this->m_count -= elem_count; ::memmove(this->m_array_p + pos, this->m_array_p + pos + elem_count, (this->m_count - pos) * sizeof(_ElementType *)); } }
void APCompactArrayBase<_ElementType>::crop( uint32_t pos, uint32_t elem_count ) { if (elem_count) { APARRAY_BOUNDS_CHECK_SPAN(pos, elem_count); this->m_count = elem_count; ::memmove(this->m_array_p, this->m_array_p + pos, elem_count * sizeof(_ElementType *)); } }
void APSizedArrayBase<_ElementType>::remove_all( uint32_t pos, uint32_t elem_count // = ALength_remainder ) { if (elem_count == ALength_remainder) { elem_count = this->m_count - pos; } if (elem_count) { APARRAY_BOUNDS_CHECK_SPAN(pos, elem_count); this->m_count -= elem_count; ::memmove(this->m_array_p + pos, this->m_array_p + pos + elem_count, (this->m_count - pos) * sizeof(_ElementType *)); } }