diff options
author | kaelima <kaelima@live.se> | 2013-06-17 05:11:24 +0200 |
---|---|---|
committer | kaelima <kaelima@live.se> | 2013-06-17 05:11:56 +0200 |
commit | aa645683b8b25bfb35cb977678daf5c56c1531e6 (patch) | |
tree | fc01096899f9a538966bd227fbf69606f7e6d91a /dep/recastnavigation/Recast/RecastAlloc.cpp | |
parent | 9b4f14ca6771930d376498b7e57968fceca887df (diff) |
Core/MMAPS: Update recastnavigation!
* Complete changelog can be found at http://code.google.com/p/recastnavigation/
* Adjusted a few config values
Important:
* New mmaps extraction is required
* Folder size will be increased
Diffstat (limited to 'dep/recastnavigation/Recast/RecastAlloc.cpp')
-rw-r--r-- | dep/recastnavigation/Recast/RecastAlloc.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/dep/recastnavigation/Recast/RecastAlloc.cpp b/dep/recastnavigation/Recast/RecastAlloc.cpp index 2c7396a1bfa..b5ec1516146 100644 --- a/dep/recastnavigation/Recast/RecastAlloc.cpp +++ b/dep/recastnavigation/Recast/RecastAlloc.cpp @@ -33,24 +33,45 @@ static void rcFreeDefault(void *ptr) static rcAllocFunc* sRecastAllocFunc = rcAllocDefault; static rcFreeFunc* sRecastFreeFunc = rcFreeDefault; +/// @see rcAlloc, rcFree void rcAllocSetCustom(rcAllocFunc *allocFunc, rcFreeFunc *freeFunc) { sRecastAllocFunc = allocFunc ? allocFunc : rcAllocDefault; sRecastFreeFunc = freeFunc ? freeFunc : rcFreeDefault; } +/// @see rcAllocSetCustom void* rcAlloc(int size, rcAllocHint hint) { return sRecastAllocFunc(size, hint); } +/// @par +/// +/// @warning This function leaves the value of @p ptr unchanged. So it still +/// points to the same (now invalid) location, and not to null. +/// +/// @see rcAllocSetCustom void rcFree(void* ptr) { if (ptr) sRecastFreeFunc(ptr); } +/// @class rcIntArray +/// +/// While it is possible to pre-allocate a specific array size during +/// construction or by using the #resize method, certain methods will +/// automatically resize the array as needed. +/// +/// @warning The array memory is not initialized to zero when the size is +/// manually set during construction or when using #resize. +/// @par +/// +/// Using this method ensures the array is at least large enough to hold +/// the specified number of elements. This can improve performance by +/// avoiding auto-resizing during use. void rcIntArray::resize(int n) { if (n > m_cap) |