MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / push_back

Method push_back

TombEngine/Specific/fast_vector.h:346–363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

344
345template <class T>
346void 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
365template <class T>
366void fast_vector<T>::bulk_push_back(std::vector<T>& source, int startIndex, int count)

Callers 15

AddStringMethod · 0.45
DrawRatsMethod · 0.45
DrawFishSwarmMethod · 0.45
DrawBatsMethod · 0.45
DrawScarabsMethod · 0.45
DrawLocustsMethod · 0.45
DrawTriangles3DMethod · 0.45
AddDebugLineMethod · 0.45
AddDebugTriangleMethod · 0.45
AddDebugConeMethod · 0.45

Calls 1

reserveFunction · 0.50

Tested by 1

TestVolumesFunction · 0.36