From c9d35b6edcc87ca2f85742b23c2a3dae08ef23b1 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Sun, 29 Aug 2021 18:35:44 +0200 Subject: [PATCH] Remove C++14 feature. --- code/AssetLib/3MF/D3MFOpcPackage.cpp | 3 ++- code/AssetLib/3MF/D3MFOpcPackage.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/AssetLib/3MF/D3MFOpcPackage.cpp b/code/AssetLib/3MF/D3MFOpcPackage.cpp index 25ed4a368..c29cec368 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.cpp +++ b/code/AssetLib/3MF/D3MFOpcPackage.cpp @@ -133,7 +133,7 @@ static bool IsEmbeddedTexture( const std::string &filename ) { D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) : mRootStream(nullptr), mZipArchive() { - mZipArchive = std::make_unique(pIOHandler, rFile); + mZipArchive = new ZipArchiveIOSystem(pIOHandler, rFile); if (!mZipArchive->isOpen()) { throw DeadlyImportError("Failed to open file ", rFile, "."); } @@ -185,6 +185,7 @@ D3MFOpcPackage::D3MFOpcPackage(IOSystem *pIOHandler, const std::string &rFile) : D3MFOpcPackage::~D3MFOpcPackage() { mZipArchive->Close(mRootStream); + delete mZipArchive; mZipArchive = nullptr; } diff --git a/code/AssetLib/3MF/D3MFOpcPackage.h b/code/AssetLib/3MF/D3MFOpcPackage.h index 93928b9a7..fda74a879 100644 --- a/code/AssetLib/3MF/D3MFOpcPackage.h +++ b/code/AssetLib/3MF/D3MFOpcPackage.h @@ -74,7 +74,7 @@ protected: private: IOStream* mRootStream; - std::unique_ptr mZipArchive; + ZipArchiveIOSystem *mZipArchive; std::vector mEmbeddedTextures; };