diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-30 17:57:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-30 17:57:55 +0200 |
commit | 41ac6cfac155bc977bc619b74ac411b8887d9635 (patch) | |
tree | 849576a57908925f0e5aaf9ea5e1f1e0635a1ebc /thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp | |
parent | f870118323f9f1e4cd7d3ea63e951a2214f63c48 (diff) | |
parent | 6ba546f98bd278dab7503e7c6b7f9166af525eda (diff) |
Merge pull request #38364 from akien-mga/recast-57610fa
Recast: Update to upstream commit 57610fa (2019)
Diffstat (limited to 'thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp')
-rw-r--r-- | thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp b/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp index 453b5fa6a6..bdc366116e 100644 --- a/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp +++ b/thirdparty/recastnavigation/Recast/Source/RecastAlloc.cpp @@ -58,29 +58,3 @@ 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::doResize(int n) -{ - if (!m_cap) m_cap = n; - while (m_cap < n) m_cap *= 2; - int* newData = (int*)rcAlloc(m_cap*sizeof(int), RC_ALLOC_TEMP); - rcAssert(newData); - if (m_size && newData) memcpy(newData, m_data, m_size*sizeof(int)); - rcFree(m_data); - m_data = newData; -} - |