HeapArray: Fix swap() not swapping size

Even though it's not used.
This commit is contained in:
Stenzek 2024-04-27 13:18:34 +10:00
parent f1f4bac8a8
commit 5477f2eae2
No known key found for this signature in database
1 changed files with 5 additions and 1 deletions

View File

@ -247,7 +247,11 @@ public:
void fill(const_reference value) { std::fill(begin(), end(), value); }
void swap(this_type& move) { std::swap(m_data, move.m_data); }
void swap(this_type& rhs)
{
std::swap(m_data, rhs.m_data);
std::swap(m_size, rhs.m_size);
}
void resize(size_t new_size) { internal_resize(new_size, m_data, m_size); }