diff options
author | Hubert Figuière <hub@figuiere.net> | 2019-01-05 09:29:51 -0500 |
---|---|---|
committer | Hubert Figuière <hub@figuiere.net> | 2019-01-05 09:29:51 -0500 |
commit | 6569c61a4e02ade3e25c9433c939d9b7061d0c21 (patch) | |
tree | c3ee2272d80689fea2e3e5658ee03aa6cd41db7d | |
parent | 87ac2729d92698fe3d4a1c1ba3c195874ada5720 (diff) |
xmp_sdk: Delete implicit ctor and operator instead of throwing
-rw-r--r-- | XMPCore/source/XMPIterator.hpp | 10 | ||||
-rw-r--r-- | XMPCore/source/XMPMeta.hpp | 6 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/ID3_Support.hpp | 4 | ||||
-rw-r--r-- | XMPFiles/source/FormatSupport/IFF/ChunkController.h | 2 |
4 files changed, 7 insertions, 15 deletions
diff --git a/XMPCore/source/XMPIterator.hpp b/XMPCore/source/XMPIterator.hpp index 544bf34..eb9dccd 100644 --- a/XMPCore/source/XMPIterator.hpp +++ b/XMPCore/source/XMPIterator.hpp @@ -130,13 +130,9 @@ public: private: // ! These are hidden on purpose: - XMPIterator() : clientRefs(0) - { XMP_Throw ( "Call to hidden constructor", kXMPErr_InternalFailure ); }; - XMPIterator ( const XMPIterator & /* original */ ) : clientRefs(0) - { XMP_Throw ( "Call to hidden constructor", kXMPErr_InternalFailure ); }; - void operator= ( const XMPIterator & /* rhs */ ) - { XMP_Throw ( "Call to hidden operator=", kXMPErr_InternalFailure ); }; - + XMPIterator() = delete; + XMPIterator ( const XMPIterator & /* original */ ) = delete; + void operator= ( const XMPIterator & /* rhs */ ) = delete; }; // ================================================================================================= diff --git a/XMPCore/source/XMPMeta.hpp b/XMPCore/source/XMPMeta.hpp index a93554d..e05f69d 100644 --- a/XMPCore/source/XMPMeta.hpp +++ b/XMPCore/source/XMPMeta.hpp @@ -411,10 +411,8 @@ public: private: // ! These are hidden on purpose: - XMPMeta ( const XMPMeta & /* original */ ) : clientRefs(0), tree(XMP_Node(0,"",0)), xmlParser(0) - { XMP_Throw ( "Call to hidden constructor", kXMPErr_InternalFailure ); }; - void operator= ( const XMPMeta & /* rhs */ ) - { XMP_Throw ( "Call to hidden operator=", kXMPErr_InternalFailure ); }; + XMPMeta ( const XMPMeta & /* original */ ) = delete; + void operator= ( const XMPMeta & /* rhs */ ) = delete; // Special support routines for parsing, here to be able to access the errorCallback. void ProcessXMLTree ( XMP_OptionBits options ); diff --git a/XMPFiles/source/FormatSupport/ID3_Support.hpp b/XMPFiles/source/FormatSupport/ID3_Support.hpp index 8b61894..d2e7ed6 100644 --- a/XMPFiles/source/FormatSupport/ID3_Support.hpp +++ b/XMPFiles/source/FormatSupport/ID3_Support.hpp @@ -111,9 +111,7 @@ namespace ID3_Support { ID3v2Frame(); ID3v2Frame ( XMP_Uns32 id ); - ID3v2Frame ( const ID3v2Frame& /*orig*/ ) { - XMP_Throw ( "ID3v2Frame copy constructor not implemented", kXMPErr_InternalFailure ); - } + ID3v2Frame ( const ID3v2Frame& /*orig*/ ) = delete; ~ID3v2Frame() { this->release(); } diff --git a/XMPFiles/source/FormatSupport/IFF/ChunkController.h b/XMPFiles/source/FormatSupport/IFF/ChunkController.h index bc53169..bc79c27 100644 --- a/XMPFiles/source/FormatSupport/IFF/ChunkController.h +++ b/XMPFiles/source/FormatSupport/IFF/ChunkController.h @@ -156,7 +156,7 @@ class ChunkController * Hidden on purpose. Must not be used! * A Controller must have a behavior! */ - ChunkController() { XMP_Throw("Ctor hidden", kXMPErr_InternalFailure); } + ChunkController() = delete; /** * The function Parses all the sibling chunks. For every chunk it either caches the chunk, |