1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 09:59:56 +00:00
openmw/components/detournavigator/navmeshdata.hpp
2022-09-22 21:35:26 +03:00

32 lines
656 B
C++

#ifndef OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHDATA_H
#define OPENMW_COMPONENTS_DETOURNAVIGATOR_NAVMESHDATA_H
#include <DetourAlloc.h>
#include <memory>
namespace DetourNavigator
{
struct NavMeshDataValueDeleter
{
void operator()(unsigned char* value) const { dtFree(value); }
};
using NavMeshDataValue = std::unique_ptr<unsigned char, NavMeshDataValueDeleter>;
struct NavMeshData
{
NavMeshDataValue mValue;
int mSize = 0;
NavMeshData() = default;
NavMeshData(unsigned char* value, int size)
: mValue(value)
, mSize(size)
{
}
};
}
#endif