MCPcopy Create free account
hub / github.com/ErrorAtLine0/infinipaint / insert

Method insert

include/vk_mem_alloc.h:4635–4645  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4633
4634template<typename T, typename AllocatorT>
4635void VmaVector<T, AllocatorT>::insert(size_t index, const T& src)
4636{
4637 VMA_HEAVY_ASSERT(index <= m_Count);
4638 const size_t oldCount = size();
4639 resize(oldCount + 1);
4640 if (index < oldCount)
4641 {
4642 memmove(m_pArray + (index + 1), m_pArray + index, (oldCount - index) * sizeof(T));
4643 }
4644 m_pArray[index] = src;
4645}
4646
4647template<typename T, typename AllocatorT>
4648void VmaVector<T, AllocatorT>::remove(size_t index)

Callers 1

VmaVectorInsertFunction · 0.45

Calls 3

sizeFunction · 0.85
resizeFunction · 0.50
dataClass · 0.50

Tested by

no test coverage detected