From d79e0c0ba990cb4193d740e08f8f68602bdd40a7 Mon Sep 17 00:00:00 2001 From: RichardTea <31507749+RichardTea@users.noreply.github.com> Date: Tue, 26 Jan 2021 17:33:10 +0000 Subject: [PATCH] Avoid std::make_unique Assimp is still C++11 --- code/AssetLib/glTF2/glTF2Asset.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/glTF2/glTF2Asset.inl b/code/AssetLib/glTF2/glTF2Asset.inl index 6b8c69296..b38217f83 100644 --- a/code/AssetLib/glTF2/glTF2Asset.inl +++ b/code/AssetLib/glTF2/glTF2Asset.inl @@ -209,7 +209,7 @@ inline void SetDecodedIndexBuffer_Draco(const draco::Mesh &dracoMesh, Mesh::Prim // Create a decoded Index buffer (if there is one) size_t componentBytes = prim.indices->GetBytesPerComponent(); - auto decodedIndexBuffer = std::make_unique(); + std::unique_ptr decodedIndexBuffer(new Buffer()); decodedIndexBuffer->Grow(dracoMesh.num_faces() * 3 * componentBytes); // If accessor uses the same size as draco implementation, copy the draco buffer directly @@ -257,7 +257,7 @@ inline void SetDecodedAttributeBuffer_Draco(const draco::Mesh &dracoMesh, uint32 size_t componentBytes = accessor.GetBytesPerComponent(); - auto decodedAttribBuffer = std::make_unique(); + std::unique_ptr decodedAttribBuffer(new Buffer()); decodedAttribBuffer->Grow(dracoMesh.num_points() * pDracoAttribute->num_components() * componentBytes); switch(accessor.componentType)