| 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> |
no outgoing calls