[ox/std] Make Vector::push_back use copy constructor instead of copy assign
This commit is contained in:
Vendored
+1
-1
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user