From aefd901befd375da7fdedfe031e818fcbc63dd67 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 26 Jan 2023 18:07:42 -0800 Subject: [PATCH] fix copy constructors clang-tidy couldn't transform these because of missing members Found with cppcheck. Signed-off-by: Rosen Penev --- src/tiffcomposite_int.cpp | 19 ------------------- src/tiffcomposite_int.hpp | 6 +++--- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/src/tiffcomposite_int.cpp b/src/tiffcomposite_int.cpp index 1fcc55bf..376e7950 100644 --- a/src/tiffcomposite_int.cpp +++ b/src/tiffcomposite_int.cpp @@ -141,25 +141,6 @@ TiffEntryBase::TiffEntryBase(const TiffEntryBase& rhs) : storage_(rhs.storage_) { } -TiffDirectory::TiffDirectory(const TiffDirectory& rhs) : TiffComponent(rhs), hasNext_(rhs.hasNext_) { -} - -TiffSubIfd::TiffSubIfd(const TiffSubIfd& rhs) : TiffEntryBase(rhs), newGroup_(rhs.newGroup_) { -} - -TiffBinaryArray::TiffBinaryArray(const TiffBinaryArray& rhs) : - TiffEntryBase(rhs), - cfgSelFct_(rhs.cfgSelFct_), - arraySet_(rhs.arraySet_), - arrayCfg_(rhs.arrayCfg_), - arrayDef_(rhs.arrayDef_), - defSize_(rhs.defSize_), - setSize_(rhs.setSize_), - origData_(rhs.origData_), - origSize_(rhs.origSize_), - pRoot_(rhs.pRoot_) { -} - TiffComponent::UniquePtr TiffComponent::clone() const { return UniquePtr(doClone()); } diff --git a/src/tiffcomposite_int.hpp b/src/tiffcomposite_int.hpp index e198ea59..c32c41c5 100644 --- a/src/tiffcomposite_int.hpp +++ b/src/tiffcomposite_int.hpp @@ -864,7 +864,7 @@ class TiffDirectory : public TiffComponent { //! @name Protected Creators //@{ //! Copy constructor (used to implement clone()). - TiffDirectory(const TiffDirectory& rhs); + TiffDirectory(const TiffDirectory&) = default; //@} //! @name Protected Manipulators @@ -958,7 +958,7 @@ class TiffSubIfd : public TiffEntryBase { //! @name Protected Creators //@{ //! Copy constructor (used to implement clone()). - TiffSubIfd(const TiffSubIfd& rhs); + TiffSubIfd(const TiffSubIfd&) = default; TiffSubIfd& operator=(const TiffSubIfd&) = delete; //@} @@ -1360,7 +1360,7 @@ class TiffBinaryArray : public TiffEntryBase { //! @name Protected Creators //@{ //! Copy constructor (used to implement clone()). - TiffBinaryArray(const TiffBinaryArray& rhs); + TiffBinaryArray(const TiffBinaryArray&) = default; //@} //! @name Protected Manipulators