MCPcopy Create free account
hub / github.com/davidgiven/fluxengine / resize

Method resize

dep/agg/include/agg_array.h:392–408  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

390 //------------------------------------------------------------------------
391 template <class T>
392 void pod_vector<T>::resize(unsigned new_size)
393 {
394 if (new_size > m_size)
395 {
396 if (new_size > m_capacity)
397 {
398 T* data = pod_allocator<T>::allocate(new_size);
399 std::memcpy(data, m_array, m_size * sizeof(T));
400 pod_allocator<T>::deallocate(m_array, m_capacity);
401 m_array = data;
402 }
403 }
404 else
405 {
406 m_size = new_size;
407 }
408 }
409
410 //------------------------------------------------------------------------
411 template <class T>

Callers 15

encodeMethod · 0.45
encodeMethod · 0.45
encodeMethod · 0.45
encodeMethod · 0.45
adjustBoundsMethod · 0.45
bytes.ccFile · 0.45
compressMethod · 0.45
bitmap.ccFile · 0.45
getFileMethod · 0.45
putBlockMethod · 0.45
initMethod · 0.45
getFileMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_writesFunction · 0.36