From de0b50aef9e992fca2035ba905c7e8a0e7caac29 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 15 Sep 2017 19:54:43 +0200 Subject: [PATCH] Add shortcut for allocation of a type. --- server/TracySlab.hpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 + T* Alloc() + { + return (T*)Alloc( sizeof( T ) ); + } + void Unalloc( size_t size ) { assert( size <= m_offset );