From 49679640e849cadbb56185253b0b9ac2bfa91f18 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 24 Jul 2022 16:52:10 -0700 Subject: [PATCH] make_unique conversions Requires pointer hack for MSVC. Signed-off-by: Rosen Penev --- src/tiffcomposite_int.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index 26cc60ca..4f654fdb 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -1542,19 +1542,19 @@ TiffComponent::UniquePtr newTiffSubIfd(uint16_t tag, IfdId group) { //! Function to create and initialize a new binary array entry template TiffComponent::UniquePtr newTiffBinaryArray0(uint16_t tag, IfdId group) { - return TiffComponent::UniquePtr(new TiffBinaryArray(tag, group, arrayCfg, arrayDef, N)); + return std::make_unique(tag, group, &(*arrayCfg), &(*arrayDef), N); } //! Function to create and initialize a new simple binary array entry template TiffComponent::UniquePtr newTiffBinaryArray1(uint16_t tag, IfdId group) { - return TiffComponent::UniquePtr(new TiffBinaryArray(tag, group, arrayCfg, nullptr, 0)); + return std::make_unique(tag, group, &(*arrayCfg), nullptr, 0); } //! Function to create and initialize a new complex binary array entry template TiffComponent::UniquePtr newTiffBinaryArray2(uint16_t tag, IfdId group) { - return TiffComponent::UniquePtr(new TiffBinaryArray(tag, group, arraySet, N, cfgSelFct)); + return std::make_unique(tag, group, &(*arraySet), N, cfgSelFct); } //! Function to create and initialize a new TIFF entry for a thumbnail (data)