| 344 | |
| 345 | template <class T> |
| 346 | void fast_vector<T>::push_back(const T& value) |
| 347 | { |
| 348 | if (m_size == m_capacity) |
| 349 | { |
| 350 | reserve(m_capacity * fast_vector::grow_factor + 1); |
| 351 | } |
| 352 | |
| 353 | if constexpr (std::is_trivial_v<T>) |
| 354 | { |
| 355 | m_data[m_size] = value; |
| 356 | } |
| 357 | else |
| 358 | { |
| 359 | new (m_data + m_size) T(value); |
| 360 | } |
| 361 | |
| 362 | m_size++; |
| 363 | } |
| 364 | |
| 365 | template <class T> |
| 366 | void fast_vector<T>::bulk_push_back(std::vector<T>& source, int startIndex, int count) |