MCPcopy Create free account
hub / github.com/BTCGPU/BTCGPU / insert

Method insert

src/prevector.h:358–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356 }
357
358 iterator insert(iterator pos, const T& value) {
359 size_type p = pos - begin();
360 size_type new_size = size() + 1;
361 if (capacity() < new_size) {
362 change_capacity(new_size + (new_size >> 1));
363 }
364 T* ptr = item_ptr(p);
365 memmove(ptr + 1, ptr, (size() - p) * sizeof(T));
366 _size++;
367 new(static_cast<void*>(ptr)) T(value);
368 return iterator(ptr);
369 }
370
371 void insert(iterator pos, size_type count, const T& value) {
372 size_type p = pos - begin();

Callers

nothing calls this directly

Calls 1

iteratorClass · 0.85

Tested by

no test coverage detected