diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2017-11-19 21:17:54 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2017-11-19 21:17:54 +0300 |
commit | 94bd5637534467bdff0727c79e3548f496b3a422 (patch) | |
tree | b871b013d2562e892d19890dc3423906fd212140 /server/TracyVector.hpp | |
parent | a4e909a740ce2062ee530681a5825a49ecd683b9 (diff) |
Back-and-pop operation on Vector.
Diffstat (limited to 'server/TracyVector.hpp')
-rw-r--r-- | server/TracyVector.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/server/TracyVector.hpp b/server/TracyVector.hpp index d7a30f72..41b808a0 100644 --- a/server/TracyVector.hpp +++ b/server/TracyVector.hpp @@ -153,6 +153,13 @@ public: m_size--; } + T& back_and_pop() + { + assert( m_size > 0 ); + m_size--; + return m_ptr[m_size]; + } + void reserve( size_t cap ) { if( cap == 0 || cap <= Capacity() ) return; |