mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-03 21:09:41 +00:00
Add missing include and use std malloc and free
This commit is contained in:
parent
3a9b1ce63a
commit
bb0c478954
1 changed files with 4 additions and 2 deletions
|
@ -3,6 +3,8 @@
|
||||||
|
|
||||||
#include "recasttempallocator.hpp"
|
#include "recasttempallocator.hpp"
|
||||||
|
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
namespace DetourNavigator
|
namespace DetourNavigator
|
||||||
{
|
{
|
||||||
class RecastGlobalAllocator
|
class RecastGlobalAllocator
|
||||||
|
@ -32,7 +34,7 @@ namespace DetourNavigator
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(BufferType_perm == getDataPtrBufferType(ptr));
|
assert(BufferType_perm == getDataPtrBufferType(ptr));
|
||||||
::free(getPermDataPtrHeapPtr(ptr));
|
std::free(getPermDataPtrHeapPtr(ptr));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +58,7 @@ namespace DetourNavigator
|
||||||
|
|
||||||
static void* allocPerm(size_t size)
|
static void* allocPerm(size_t size)
|
||||||
{
|
{
|
||||||
const auto ptr = ::malloc(size + sizeof(std::size_t));
|
const auto ptr = std::malloc(size + sizeof(std::size_t));
|
||||||
if (rcUnlikely(!ptr))
|
if (rcUnlikely(!ptr))
|
||||||
return ptr;
|
return ptr;
|
||||||
setPermPtrBufferType(ptr, BufferType_perm);
|
setPermPtrBufferType(ptr, BufferType_perm);
|
||||||
|
|
Loading…
Reference in a new issue