Skip to content

Commit

Permalink
HeapArray: Add missing field swap
Browse files Browse the repository at this point in the history
  • Loading branch information
stenzek committed May 4, 2024
1 parent 58da6c4 commit debe6b8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion common/HeapArray.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,11 @@ class DynamicHeapArray

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& move)
{
std::swap(m_data, move.m_data);
std::swap(m_size, move.m_size);
}

void resize(size_t new_size) { internal_resize(new_size, m_data, m_size); }

Expand Down

0 comments on commit debe6b8

Please sign in to comment.