From 94905d445fe658d69e2abc6cd4a740bf29ecb249 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Mon, 15 May 2023 16:06:02 +0200 Subject: [PATCH] Revert usage of unique_ptr - error. --- code/Common/StackAllocator.h | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/code/Common/StackAllocator.h b/code/Common/StackAllocator.h index 33a8bb569..191010cac 100644 --- a/code/Common/StackAllocator.h +++ b/code/Common/StackAllocator.h @@ -60,21 +60,21 @@ namespace Assimp { */ class StackAllocator { public: - // Constructs the allocator + /// @brief Constructs the allocator inline StackAllocator(); - // Destructs the allocator and frees all memory + /// @brief Destructs the allocator and frees all memory inline ~StackAllocator(); // non copyable StackAllocator(const StackAllocator &) = delete; StackAllocator &operator=(const StackAllocator &) = delete; - // Returns a pointer to byteSize bytes of heap memory that persists - // for the lifetime of the allocator (or until FreeAll is called). + /// @brief Returns a pointer to byteSize bytes of heap memory that persists + /// for the lifetime of the allocator (or until FreeAll is called). inline void *Allocate(size_t byteSize); - // Releases all the memory owned by this allocator. - // Memory provided through function Allocate is not valid anymore after this function has been called. + /// @brief Releases all the memory owned by this allocator. + // Memory provided through function Allocate is not valid anymore after this function has been called. inline void FreeAll(); private: @@ -82,8 +82,7 @@ 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 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 - std::vector> m_storageBlocks; - //std::vector m_storageBlocks; // A list of blocks + std::vector m_storageBlocks; // A list of blocks }; } // namespace Assimp