removed std::function - closes #354
This commit is contained in:
parent
c4b0e2a211
commit
60cb32b833
3 changed files with 4 additions and 16 deletions
|
@ -1,7 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
|
||||
#include <functional>
|
||||
#include "job.h"
|
||||
#include "manager.h"
|
||||
|
||||
|
@ -26,7 +25,7 @@ public:
|
|||
void execute() override { m_function(); }
|
||||
|
||||
private:
|
||||
std::function<void()> m_function;
|
||||
T m_function;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "renderer/texture.h"
|
||||
|
||||
#include "universe/universe.h"
|
||||
#include <cmath>
|
||||
|
||||
|
||||
namespace Lumix
|
||||
|
|
|
@ -84,11 +84,6 @@ struct BGFXAllocator : public bx::AllocatorI
|
|||
}
|
||||
|
||||
|
||||
~BGFXAllocator()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static const size_t NATURAL_ALIGNEMENT = 8;
|
||||
|
||||
|
||||
|
@ -111,25 +106,18 @@ struct BGFXAllocator : public bx::AllocatorI
|
|||
}
|
||||
else if (!_ptr)
|
||||
{
|
||||
if (NATURAL_ALIGNEMENT >= _alignment)
|
||||
{
|
||||
return m_source.allocate(_size);
|
||||
}
|
||||
if (NATURAL_ALIGNEMENT >= _alignment) return m_source.allocate(_size);
|
||||
|
||||
return m_source.allocate_aligned(_size, _alignment);
|
||||
}
|
||||
|
||||
if (NATURAL_ALIGNEMENT >= _alignment)
|
||||
{
|
||||
return m_source.reallocate(_ptr, _size);
|
||||
}
|
||||
if (NATURAL_ALIGNEMENT >= _alignment) return m_source.reallocate(_ptr, _size);
|
||||
|
||||
return m_source.reallocate_aligned(_ptr, _size, _alignment);
|
||||
}
|
||||
|
||||
|
||||
Lumix::IAllocator& m_source;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue