From a98954a98e733ba6310ef92d0ef1fcc69ae98ff5 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sat, 21 May 2022 17:06:36 -0700 Subject: [PATCH] clang-tidy: add missing special member functions Signed-off-by: Rosen Penev --- app/actions.hpp | 2 ++ app/exiv2app.hpp | 2 ++ include/exiv2/webpimage.hpp | 1 + src/crwimage_int.hpp | 4 ++++ src/makernote_int.hpp | 4 +++- 5 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/actions.hpp b/app/actions.hpp index 62a1c557..ec89ef85 100644 --- a/app/actions.hpp +++ b/app/actions.hpp @@ -97,8 +97,10 @@ class TaskFactory { */ static TaskFactory& instance(); + ~TaskFactory() = default; //! Prevent copy construction: not implemented. TaskFactory(const TaskFactory&) = delete; + TaskFactory& operator=(const TaskFactory&) = delete; //! Destructor void cleanup(); diff --git a/app/exiv2app.hpp b/app/exiv2app.hpp index c12fce61..8921045b 100644 --- a/app/exiv2app.hpp +++ b/app/exiv2app.hpp @@ -110,7 +110,9 @@ class Params : public Util::Getopt { static Params& instance(); //! Prevent copy-construction: not implemented. + ~Params() = default; Params(const Params&) = delete; + Params& operator=(const Params&) = delete; //! Enumerates print modes enum PrintMode { diff --git a/include/exiv2/webpimage.hpp b/include/exiv2/webpimage.hpp index 09e60b23..d9dda5a7 100644 --- a/include/exiv2/webpimage.hpp +++ b/include/exiv2/webpimage.hpp @@ -54,6 +54,7 @@ class EXIV2API WebPImage : public Image { [[nodiscard]] std::string mimeType() const override; //@} + ~WebPImage() = default; //! Copy constructor WebPImage(const WebPImage&) = delete; //! Assignment operator diff --git a/src/crwimage_int.hpp b/src/crwimage_int.hpp index 4c09abf8..2c2318e9 100644 --- a/src/crwimage_int.hpp +++ b/src/crwimage_int.hpp @@ -330,6 +330,9 @@ class CiffDirectory : public CiffComponent { ~CiffDirectory() override; //@} + CiffDirectory(const CiffDirectory&) = delete; + CiffDirectory& operator=(const CiffDirectory&) = delete; + //! @name Manipulators //@{ // Default assignment operator is fine @@ -522,6 +525,7 @@ struct CrwMapping { */ class CrwMap { public: + ~CrwMap() = delete; //! @name Not implemented //@{ CrwMap(const CrwMap&) = delete; diff --git a/src/makernote_int.hpp b/src/makernote_int.hpp index 28b25f0f..5a8880fa 100644 --- a/src/makernote_int.hpp +++ b/src/makernote_int.hpp @@ -81,8 +81,10 @@ class TiffMnCreator { */ static TiffComponent* create(uint16_t tag, IfdId group, IfdId mnGroup); + ~TiffMnCreator() = default; //! Prevent destruction (needed if used as a policy class) - ~TiffMnCreator() = delete; + TiffMnCreator(const TiffComponent&) = delete; + TiffMnCreator& operator=(const TiffComponent&) = delete; private: static const TiffMnRegistry registry_[]; //