Skip to content

Commit

Permalink
fix copy constructors
Browse files Browse the repository at this point in the history
clang-tidy couldn't transform these because of missing members

Found with cppcheck.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
  • Loading branch information
neheb committed Jan 27, 2023
1 parent ed67372 commit afb2d99
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 22 deletions.
19 changes: 0 additions & 19 deletions src/tiffcomposite_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
6 changes: 3 additions & 3 deletions src/tiffcomposite_int.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
//@}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit afb2d99

Please sign in to comment.