Merge pull request #179 from diamante0018/fix-font-asset

[IFont] Use Zone allocator instead of static mem allocator
This commit is contained in:
Dss0
2022-03-12 11:44:35 +01:00
committed by GitHub
2 changed files with 23 additions and 14 deletions

View File

@ -81,10 +81,12 @@ namespace Utils
this->pool.push_back(data);
return data;
}
template <typename T> inline T* allocate()
{
return this->allocateArray<T>(1);
}
template <typename T> inline T* allocateArray(size_t count = 1)
{
return static_cast<T*>(this->allocate(count * sizeof(T)));