[ox/std] Make Vector::push_back use copy constructor instead of copy assign
(synced from 0035faa416)
This commit is contained in:
@@ -245,7 +245,7 @@ void Vector<T>::push_back(const T &item) noexcept {
|
||||
if (m_size == m_cap) {
|
||||
expandCap(m_cap ? m_cap * 2 : 100);
|
||||
}
|
||||
m_items[m_size] = item;
|
||||
new (&m_items[m_size]) T(item);
|
||||
++m_size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user