Fix: Use vector.

pull/5096/head
Kim Kulling 2023-05-15 15:08:52 +02:00 committed by GitHub
parent aed43878ef
commit b5b6400320
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 4 deletions

View File

@ -47,8 +47,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef AI_STACK_ALLOCATOR_H_INC #ifndef AI_STACK_ALLOCATOR_H_INC
#define AI_STACK_ALLOCATOR_H_INC #define AI_STACK_ALLOCATOR_H_INC
#include <vector>
#include <deque>
#include <stdint.h> #include <stdint.h>
#include <stddef.h> #include <stddef.h>
@ -83,10 +82,9 @@ private:
constexpr const static size_t g_startBytesPerBlock = 16 * 1024; // Size of the first block. Next blocks will double in size until maximum size of g_maxBytesPerBlock constexpr const static size_t g_startBytesPerBlock = 16 * 1024; // Size of the first block. Next blocks will double in size until maximum size of g_maxBytesPerBlock
size_t m_blockAllocationSize = g_startBytesPerBlock; // Block size of the current block size_t m_blockAllocationSize = g_startBytesPerBlock; // Block size of the current block
size_t m_subIndex = g_maxBytesPerBlock; // The current byte offset in the current block size_t m_subIndex = g_maxBytesPerBlock; // The current byte offset in the current block
std::deque<uint8_t *> m_storageBlocks; // A list of blocks std::vector<uint8_t *> m_storageBlocks; // A list of blocks
}; };
} // namespace Assimp } // namespace Assimp
#include "StackAllocator.inl" #include "StackAllocator.inl"