diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2017-09-15 20:54:43 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2017-09-15 20:54:43 +0300 |
commit | de0b50aef9e992fca2035ba905c7e8a0e7caac29 (patch) | |
tree | b371d786606ba1b88f56050cab289c24d6eea589 /server/TracySlab.hpp | |
parent | 47f6c8d06b2c8525a99a7d227a2efdf7398b5ddb (diff) |
Add shortcut for allocation of a type.
Diffstat (limited to 'server/TracySlab.hpp')
-rwxr-xr-x | server/TracySlab.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/server/TracySlab.hpp b/server/TracySlab.hpp index b13bae09..a8960a57 100755 --- a/server/TracySlab.hpp +++ b/server/TracySlab.hpp @@ -39,6 +39,12 @@ public: return ret; } + template<typename T> + T* Alloc() + { + return (T*)Alloc( sizeof( T ) ); + } + void Unalloc( size_t size ) { assert( size <= m_offset ); |