mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
Fix gcc & clang Compile for FrameAllocator changes
This commit is contained in:
parent
45898694e4
commit
28ba2f2473
1 changed files with 4 additions and 3 deletions
|
|
@ -152,6 +152,7 @@ public:
|
||||||
///
|
///
|
||||||
template<typename T> class ManagedAlignedBufferAllocator : public AlignedBufferAllocator<T>
|
template<typename T> class ManagedAlignedBufferAllocator : public AlignedBufferAllocator<T>
|
||||||
{
|
{
|
||||||
|
typedef AlignedBufferAllocator<T> Parent;
|
||||||
public:
|
public:
|
||||||
T* mMemory;
|
T* mMemory;
|
||||||
|
|
||||||
|
|
@ -167,14 +168,14 @@ public:
|
||||||
void init(const dsize_t byteSize)
|
void init(const dsize_t byteSize)
|
||||||
{
|
{
|
||||||
AssertFatal(mMemory == NULL, "ManagedAlignedBufferAllocator already initialized");
|
AssertFatal(mMemory == NULL, "ManagedAlignedBufferAllocator already initialized");
|
||||||
U32 frameSize = calcRequiredElementSize(byteSize);
|
U32 frameSize = Parent::calcRequiredElementSize(byteSize);
|
||||||
mMemory = new U32[frameSize];
|
mMemory = new U32[frameSize];
|
||||||
initWithElements(mMemory, frameSize);
|
AlignedBufferAllocator<T>::initWithElements(mMemory, frameSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
void destroy()
|
void destroy()
|
||||||
{
|
{
|
||||||
//setPositition(0);
|
Parent::setPosition(0);
|
||||||
delete[] mMemory;
|
delete[] mMemory;
|
||||||
mMemory = NULL;
|
mMemory = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue