[ox/std] Make Vector::push_back use copy constructor instead of copy assign

This commit is contained in:
Gary Talent 2020-06-20 02:58:20 -05:00
parent 5c34c26080
commit 0035faa416

View File

@ -245,7 +245,7 @@ void Vector<T>::push_back(const T &item) noexcept {
if (m_size == m_cap) { if (m_size == m_cap) {
expandCap(m_cap ? m_cap * 2 : 100); expandCap(m_cap ? m_cap * 2 : 100);
} }
m_items[m_size] = item; new (&m_items[m_size]) T(item);
++m_size; ++m_size;
} }