Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2017-09-15 20:54:43 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2017-09-15 20:54:43 +0300
commitde0b50aef9e992fca2035ba905c7e8a0e7caac29 (patch)
treeb371d786606ba1b88f56050cab289c24d6eea589 /server/TracySlab.hpp
parent47f6c8d06b2c8525a99a7d227a2efdf7398b5ddb (diff)
Add shortcut for allocation of a type.
Diffstat (limited to 'server/TracySlab.hpp')
-rwxr-xr-xserver/TracySlab.hpp6
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 );