MCPcopy Create free account
hub / github.com/MapServer/MapServer / resize

Method resize

renderers/agg/include/agg_array.h:242–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240 //------------------------------------------------------------------------
241 template<class T>
242 void pod_vector<T>::resize(unsigned new_size)
243 {
244 if(new_size > m_size)
245 {
246 if(new_size > m_capacity)
247 {
248 T* data = pod_allocator<T>::allocate(new_size);
249 memcpy(data, m_array, m_size * sizeof(T));
250 pod_allocator<T>::deallocate(m_array, m_capacity);
251 m_array = data;
252 }
253 }
254 else
255 {
256 m_size = new_size;
257 }
258 }
259
260 //------------------------------------------------------------------------
261 template<class T> pod_vector<T>::pod_vector(unsigned cap, unsigned extra_tail) :

Callers 15

realloc_lutMethod · 0.45
initMethod · 0.45
ExecuteMethod · 0.45
ClearJoinsMethod · 0.45
ClearHorzJoinsMethod · 0.45
BuildResultMethod · 0.45
load_fontMethod · 0.45
textMethod · 0.45
profileMethod · 0.45
resetMethod · 0.45
createMethod · 0.45
allocateMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected