Minor fix in packed_vector

This commit is contained in:
Eduardo Bart 2012-08-02 08:43:02 -03:00
parent 7116f6dea1
commit f103f3ee62
1 changed files with 4 additions and 0 deletions

View File

@ -106,6 +106,10 @@ public:
}
void pop_back() {
if(m_size == 1) {
clear();
return;
}
T *tmp = new T[m_size-1];
std::copy(m_data, m_data + m_size - 1, tmp);
delete[] m_data;