diff options
author | Bartosz Taudul <bartosz.taudul@game-lion.com> | 2018-04-03 15:17:51 +0300 |
---|---|---|
committer | Bartosz Taudul <bartosz.taudul@game-lion.com> | 2018-04-03 15:17:51 +0300 |
commit | bf99bff87d4342be09ca0df261387522ad7413e2 (patch) | |
tree | 6aba24d1d706cda2b975136ce3a106c414d4f17c /server/TracyVector.hpp | |
parent | bc27c99a1e4c5498b7f814cfd9d60b052fd7f67c (diff) |
Store MemEvents directly in the vector.
Diffstat (limited to 'server/TracyVector.hpp')
-rw-r--r-- | server/TracyVector.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp index db2474f8..c96c251d 100644 --- a/server/TracyVector.hpp +++ b/server/TracyVector.hpp @@ -94,6 +94,12 @@ public: m_ptr[m_size++] = std::move( v ); } + T& push_next() + { + if( m_size == Capacity() ) AllocMore(); + return m_ptr[m_size++]; + } + T* insert( T* it, const T& v ) { assert( it >= m_ptr && it <= m_ptr + m_size ); |