diff --git a/c++/src/H5AbstractDs.cpp b/c++/src/H5AbstractDs.cpp index 7ea107c7f43..ab3fabaeb69 100644 --- a/c++/src/H5AbstractDs.cpp +++ b/c++/src/H5AbstractDs.cpp @@ -316,12 +316,4 @@ AbstractDs::getVarLenType() const } } -//-------------------------------------------------------------------------- -// Function: AbstractDs destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -AbstractDs::~AbstractDs() -{ -} - } // namespace H5 diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index 49bcfebea09..d831bd65791 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -67,7 +67,7 @@ class H5_DLLCPP AbstractDs { virtual H5std_string fromClass() const = 0; // Destructor - virtual ~AbstractDs(); + virtual ~AbstractDs() = default; protected: // Default constructor diff --git a/c++/src/H5ArrayType.cpp b/c++/src/H5ArrayType.cpp index c5ad7eaad84..3a2da2bf39f 100644 --- a/c++/src/H5ArrayType.cpp +++ b/c++/src/H5ArrayType.cpp @@ -199,12 +199,4 @@ ArrayType::getArrayDims(hsize_t *dims) const return (ndims); } -//-------------------------------------------------------------------------- -// Function: ArrayType destructor -///\brief Properly terminates access to this array datatype. -//-------------------------------------------------------------------------- -ArrayType::~ArrayType() -{ -} - } // namespace H5 diff --git a/c++/src/H5ArrayType.h b/c++/src/H5ArrayType.h index e9afb9c4534..e02a3a2a0e8 100644 --- a/c++/src/H5ArrayType.h +++ b/c++/src/H5ArrayType.h @@ -60,7 +60,7 @@ class H5_DLLCPP ArrayType : public DataType { ArrayType(const hid_t existing_id); // Noop destructor - virtual ~ArrayType() override; + virtual ~ArrayType() override = default; // Default constructor ArrayType(); diff --git a/c++/src/H5AtomType.cpp b/c++/src/H5AtomType.cpp index db6c8f840a6..f2e037a98bc 100644 --- a/c++/src/H5AtomType.cpp +++ b/c++/src/H5AtomType.cpp @@ -276,14 +276,4 @@ AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const } } -#ifndef DOXYGEN_SHOULD_SKIP_THIS -//-------------------------------------------------------------------------- -// Function: AtomType destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -AtomType::~AtomType() -{ -} -#endif // DOXYGEN_SHOULD_SKIP_THIS - } // namespace H5 diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index bb2cf48b338..327604ddd56 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -67,7 +67,7 @@ class H5_DLLCPP AtomType : public DataType { AtomType(const AtomType &original); // Noop destructor - virtual ~AtomType() override; + virtual ~AtomType() override = default; #endif // DOXYGEN_SHOULD_SKIP_THIS protected: diff --git a/c++/src/H5CommonFG.cpp b/c++/src/H5CommonFG.cpp index 277ba349e40..d26c83fade0 100644 --- a/c++/src/H5CommonFG.cpp +++ b/c++/src/H5CommonFG.cpp @@ -342,14 +342,6 @@ CommonFG::CommonFG() { } -//-------------------------------------------------------------------------- -// Function: CommonFG destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -CommonFG::~CommonFG() -{ -} - //-------------------------------------------------------------------------- // Function: f_DataType_setId - friend // Purpose: This function is friend to class H5::DataType so that it diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index e6756177a72..6eb01db3bd1 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -72,7 +72,7 @@ class H5_DLLCPP CommonFG { CommonFG(); // Noop destructor. - virtual ~CommonFG(); + virtual ~CommonFG() = default; protected: virtual void p_setId(const hid_t new_id) = 0; diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index c89fa5c8f28..70bbe66556e 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -527,12 +527,4 @@ CompType::setSize(size_t size) const } } -//-------------------------------------------------------------------------- -// Function: CompType destructor -///\brief Properly terminates access to this compound datatype. -//-------------------------------------------------------------------------- -CompType::~CompType() -{ -} - } // namespace H5 diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 0675d2041d3..a642b0d5143 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -113,7 +113,7 @@ class H5_DLLCPP CompType : public DataType { } // Noop destructor. - virtual ~CompType() override; + virtual ~CompType() override = default; private: // Contains common code that is used by the member functions diff --git a/c++/src/H5DaccProp.cpp b/c++/src/H5DaccProp.cpp index 8b01665c19f..ba4c8ef60b0 100644 --- a/c++/src/H5DaccProp.cpp +++ b/c++/src/H5DaccProp.cpp @@ -153,12 +153,4 @@ DSetAccPropList::getChunkCache(size_t &rdcc_nslots, size_t &rdcc_nbytes, double } } -//-------------------------------------------------------------------------- -// Function: DSetAccPropList destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DSetAccPropList::~DSetAccPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5DaccProp.h b/c++/src/H5DaccProp.h index bb404cec407..3f101f3aa70 100644 --- a/c++/src/H5DaccProp.h +++ b/c++/src/H5DaccProp.h @@ -50,7 +50,7 @@ class H5_DLLCPP DSetAccPropList : public LinkAccPropList { DSetAccPropList(const hid_t plist_id); // Noop destructor. - virtual ~DSetAccPropList() override; + virtual ~DSetAccPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5DcreatProp.cpp b/c++/src/H5DcreatProp.cpp index 8b199a8091b..8f4ee7e490c 100644 --- a/c++/src/H5DcreatProp.cpp +++ b/c++/src/H5DcreatProp.cpp @@ -754,12 +754,4 @@ DSetCreatPropList::setVirtual(const DataSpace &vspace, const H5std_string src_fn setVirtual(vspace, src_fname.c_str(), src_dsname.c_str(), sspace); } -//-------------------------------------------------------------------------- -// Function: DSetCreatPropList destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DSetCreatPropList::~DSetCreatPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index 94ecbb53a86..3c8587dbe6b 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -140,7 +140,7 @@ class H5_DLLCPP DSetCreatPropList : public ObjCreatPropList { DSetCreatPropList(const hid_t plist_id); // Noop destructor. - virtual ~DSetCreatPropList() override; + virtual ~DSetCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5DxferProp.cpp b/c++/src/H5DxferProp.cpp index 33e2ff58c19..1b9d6510580 100644 --- a/c++/src/H5DxferProp.cpp +++ b/c++/src/H5DxferProp.cpp @@ -527,12 +527,4 @@ DSetMemXferPropList::getEDCCheck() const return (check); } -//-------------------------------------------------------------------------- -// Function: DSetMemXferPropList destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DSetMemXferPropList::~DSetMemXferPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index d0a65c108af..b86202da254 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -112,7 +112,7 @@ class H5_DLLCPP DSetMemXferPropList : public PropList { DSetMemXferPropList(const hid_t plist_id); // Noop destructor - virtual ~DSetMemXferPropList() override; + virtual ~DSetMemXferPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5EnumType.cpp b/c++/src/H5EnumType.cpp index 03c07d95122..569e56abf47 100644 --- a/c++/src/H5EnumType.cpp +++ b/c++/src/H5EnumType.cpp @@ -317,12 +317,4 @@ EnumType::getMemberValue(unsigned memb_no, void *value) const } } -//-------------------------------------------------------------------------- -// Function: EnumType destructor -///\brief Properly terminates access to this enum datatype. -//-------------------------------------------------------------------------- -EnumType::~EnumType() -{ -} - } // namespace H5 diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index a98688ea0be..a5096fcf905 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -81,7 +81,7 @@ class H5_DLLCPP EnumType : public DataType { // Copy constructor: same as the original EnumType. EnumType(const EnumType &original); - virtual ~EnumType() override; + virtual ~EnumType() override = default; }; // end of EnumType } // namespace H5 diff --git a/c++/src/H5Exception.cpp b/c++/src/H5Exception.cpp index 01b9cc10d03..906bd27e594 100644 --- a/c++/src/H5Exception.cpp +++ b/c++/src/H5Exception.cpp @@ -330,14 +330,6 @@ Exception::printErrorStack(FILE *stream, hid_t err_stack) // Exception::printErrorStack(stream, H5E_DEFAULT); //} -//-------------------------------------------------------------------------- -// Function: Exception destructor -///\brief Noop destructor -//-------------------------------------------------------------------------- -Exception::~Exception() throw() -{ -} - //-------------------------------------------------------------------------- // Subclass: FileIException //-------------------------------------------------------------------------- @@ -359,13 +351,6 @@ FileIException::FileIException(const H5std_string &func, const H5std_string &mes : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: FileIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -FileIException::~FileIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: GroupIException @@ -388,14 +373,6 @@ GroupIException::GroupIException(const H5std_string &func, const H5std_string &m : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: GroupIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -GroupIException::~GroupIException() throw() -{ -} - //-------------------------------------------------------------------------- // Subclass: DataSpaceIException //-------------------------------------------------------------------------- @@ -417,13 +394,6 @@ DataSpaceIException::DataSpaceIException(const H5std_string &func, const H5std_s : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: DataSpaceIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DataSpaceIException::~DataSpaceIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: DataTypeIException @@ -446,13 +416,6 @@ DataTypeIException::DataTypeIException(const H5std_string &func, const H5std_str : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: DataTypeIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DataTypeIException::~DataTypeIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: ObjHeaderIException @@ -475,13 +438,6 @@ ObjHeaderIException::ObjHeaderIException(const H5std_string &func, const H5std_s : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: ObjHeaderIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -ObjHeaderIException::~ObjHeaderIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: PropListIException @@ -504,13 +460,6 @@ PropListIException::PropListIException(const H5std_string &func, const H5std_str : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: PropListIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -PropListIException::~PropListIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: DataSetIException @@ -533,13 +482,6 @@ DataSetIException::DataSetIException(const H5std_string &func, const H5std_strin : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: DataSetIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -DataSetIException::~DataSetIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: AttributeIException @@ -562,13 +504,6 @@ AttributeIException::AttributeIException(const H5std_string &func, const H5std_s : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: AttributeIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -AttributeIException::~AttributeIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: ReferenceException @@ -591,13 +526,6 @@ ReferenceException::ReferenceException(const H5std_string &func, const H5std_str : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: ReferenceException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -ReferenceException::~ReferenceException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: LibraryIException @@ -620,13 +548,6 @@ LibraryIException::LibraryIException(const H5std_string &func, const H5std_strin : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: LibraryIException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -LibraryIException::~LibraryIException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: LocationException @@ -649,13 +570,6 @@ LocationException::LocationException(const H5std_string &func, const H5std_strin : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: LocationException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -LocationException::~LocationException() throw() -{ -} //-------------------------------------------------------------------------- // Subclass: IdComponentException @@ -678,12 +592,5 @@ IdComponentException::IdComponentException(const H5std_string &func, const H5std : Exception(func, message) { } -//-------------------------------------------------------------------------- -// Function: IdComponentException destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -IdComponentException::~IdComponentException() throw() -{ -} } // namespace H5 diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index d4533e59d33..6bf51ef893b 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -74,7 +74,7 @@ class H5_DLLCPP Exception { Exception(const Exception &orig); // virtual Destructor - virtual ~Exception() throw(); + virtual ~Exception() = default; protected: // Default value for detail_message @@ -89,84 +89,84 @@ class H5_DLLCPP FileIException : public Exception { public: FileIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); FileIException(); - virtual ~FileIException() throw() override; + virtual ~FileIException() override = default; }; class H5_DLLCPP GroupIException : public Exception { public: GroupIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); GroupIException(); - virtual ~GroupIException() throw() override; + virtual ~GroupIException() override = default; }; class H5_DLLCPP DataSpaceIException : public Exception { public: DataSpaceIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); DataSpaceIException(); - virtual ~DataSpaceIException() throw() override; + virtual ~DataSpaceIException() override = default; }; class H5_DLLCPP DataTypeIException : public Exception { public: DataTypeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); DataTypeIException(); - virtual ~DataTypeIException() throw() override; + virtual ~DataTypeIException() override = default; }; class H5_DLLCPP ObjHeaderIException : public Exception { public: ObjHeaderIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); ObjHeaderIException(); - virtual ~ObjHeaderIException() throw() override; + virtual ~ObjHeaderIException() override = default; }; class H5_DLLCPP PropListIException : public Exception { public: PropListIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); PropListIException(); - virtual ~PropListIException() throw() override; + virtual ~PropListIException() override = default; }; class H5_DLLCPP DataSetIException : public Exception { public: DataSetIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); DataSetIException(); - virtual ~DataSetIException() throw() override; + virtual ~DataSetIException() override = default; }; class H5_DLLCPP AttributeIException : public Exception { public: AttributeIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); AttributeIException(); - virtual ~AttributeIException() throw() override; + virtual ~AttributeIException() override = default; }; class H5_DLLCPP ReferenceException : public Exception { public: ReferenceException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); ReferenceException(); - virtual ~ReferenceException() throw() override; + virtual ~ReferenceException() override = default; }; class H5_DLLCPP LibraryIException : public Exception { public: LibraryIException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); LibraryIException(); - virtual ~LibraryIException() throw() override; + virtual ~LibraryIException() override = default; }; class H5_DLLCPP LocationException : public Exception { public: LocationException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); LocationException(); - virtual ~LocationException() throw() override; + virtual ~LocationException() override = default; }; class H5_DLLCPP IdComponentException : public Exception { public: IdComponentException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); IdComponentException(); - virtual ~IdComponentException() throw() override; + virtual ~IdComponentException() override = default; }; // end of IdComponentException } // namespace H5 diff --git a/c++/src/H5FaccProp.cpp b/c++/src/H5FaccProp.cpp index ea5692ac7c3..dc4b949b5b3 100644 --- a/c++/src/H5FaccProp.cpp +++ b/c++/src/H5FaccProp.cpp @@ -769,12 +769,4 @@ FileAccPropList::getLibverBounds(H5F_libver_t &libver_low, H5F_libver_t &libver_ } } -//-------------------------------------------------------------------------- -// Function: FileAccPropList destructor -///\brief Noop destructor -//-------------------------------------------------------------------------- -FileAccPropList::~FileAccPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index 27028a2bccd..67394f1c3a5 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -149,7 +149,7 @@ class H5_DLLCPP FileAccPropList : public PropList { FileAccPropList(const hid_t plist_id); // Noop destructor - virtual ~FileAccPropList() override; + virtual ~FileAccPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5FcreatProp.cpp b/c++/src/H5FcreatProp.cpp index fe46dee35ee..66e4ceb886b 100644 --- a/c++/src/H5FcreatProp.cpp +++ b/c++/src/H5FcreatProp.cpp @@ -357,12 +357,4 @@ FileCreatPropList::getFileSpacePagesize() const return (fsp_psize); } -//-------------------------------------------------------------------------- -// Function: FileCreatPropList destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -FileCreatPropList::~FileCreatPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 399db71d434..76c2ae5b952 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -90,7 +90,7 @@ class H5_DLLCPP FileCreatPropList : public PropList { FileCreatPropList(const hid_t plist_id); // Noop destructor - virtual ~FileCreatPropList() override; + virtual ~FileCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5FloatType.cpp b/c++/src/H5FloatType.cpp index 74170da00a3..41ee8a850bc 100644 --- a/c++/src/H5FloatType.cpp +++ b/c++/src/H5FloatType.cpp @@ -326,12 +326,4 @@ FloatType::setInpad(H5T_pad_t inpad) const } } -//-------------------------------------------------------------------------- -// Function: FloatType destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -FloatType::~FloatType() -{ -} - } // namespace H5 diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h index 42437ec1154..b804892b0a8 100644 --- a/c++/src/H5FloatType.h +++ b/c++/src/H5FloatType.h @@ -78,7 +78,7 @@ class H5_DLLCPP FloatType : public AtomType { FloatType(const FloatType &original); // Noop destructor. - virtual ~FloatType() override; + virtual ~FloatType() override = default; }; // end of FloatType } // namespace H5 diff --git a/c++/src/H5IdComponent.cpp b/c++/src/H5IdComponent.cpp index 93df34391c0..0d15aac7fb9 100644 --- a/c++/src/H5IdComponent.cpp +++ b/c++/src/H5IdComponent.cpp @@ -307,14 +307,6 @@ IdComponent::setId(const hid_t new_id) incRefCount(); } -//-------------------------------------------------------------------------- -// Function: IdComponent destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -IdComponent::~IdComponent() -{ -} - // // Implementation of protected functions for HDF5 Reference Interface // and miscellaneous helpers. diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index d64bdb5ab7d..2fef96f4137 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -81,7 +81,7 @@ class H5_DLLCPP IdComponent { #endif // DOXYGEN_SHOULD_SKIP_THIS // Destructor - virtual ~IdComponent(); + virtual ~IdComponent() = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5IntType.cpp b/c++/src/H5IntType.cpp index 87a287f6743..7c8b7d36ff9 100644 --- a/c++/src/H5IntType.cpp +++ b/c++/src/H5IntType.cpp @@ -182,12 +182,4 @@ IntType::setSign(H5T_sign_t sign) const } } -//-------------------------------------------------------------------------- -// Function: IntType destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -IntType::~IntType() -{ -} - } // namespace H5 diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h index 170ed374d4d..1ca0ab147d2 100644 --- a/c++/src/H5IntType.h +++ b/c++/src/H5IntType.h @@ -60,7 +60,7 @@ class H5_DLLCPP IntType : public AtomType { IntType(const IntType &original); // Noop destructor. - virtual ~IntType() override; + virtual ~IntType() override = default; }; // end of IntType } // namespace H5 diff --git a/c++/src/H5LaccProp.cpp b/c++/src/H5LaccProp.cpp index 0285ee7baf9..7a66c13d323 100644 --- a/c++/src/H5LaccProp.cpp +++ b/c++/src/H5LaccProp.cpp @@ -140,12 +140,4 @@ LinkAccPropList::getNumLinks() const return (nlinks); } -//-------------------------------------------------------------------------- -// Function: LinkAccPropList destructor -///\brief Noop destructor -//-------------------------------------------------------------------------- -LinkAccPropList::~LinkAccPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5LaccProp.h b/c++/src/H5LaccProp.h index 53389e2e68b..6f4b9190f06 100644 --- a/c++/src/H5LaccProp.h +++ b/c++/src/H5LaccProp.h @@ -51,7 +51,7 @@ class H5_DLLCPP LinkAccPropList : public PropList { size_t getNumLinks() const; // Noop destructor - virtual ~LinkAccPropList() override; + virtual ~LinkAccPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp index 2f3437531b8..0dbb0b275c0 100644 --- a/c++/src/H5LcreatProp.cpp +++ b/c++/src/H5LcreatProp.cpp @@ -184,13 +184,4 @@ LinkCreatPropList::getCharEncoding() const return (encoding); } -//-------------------------------------------------------------------------- -// Function: LinkCreatPropList destructor -///\brief Noop destructor -// December, 2016 -//-------------------------------------------------------------------------- -LinkCreatPropList::~LinkCreatPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5LcreatProp.h b/c++/src/H5LcreatProp.h index 233a98bd92b..272f260b253 100644 --- a/c++/src/H5LcreatProp.h +++ b/c++/src/H5LcreatProp.h @@ -58,7 +58,7 @@ class H5_DLLCPP LinkCreatPropList : public PropList { H5T_cset_t getCharEncoding() const; // Noop destructor - virtual ~LinkCreatPropList() override; + virtual ~LinkCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5Library.cpp b/c++/src/H5Library.cpp index 019ae67b4cf..c16bd819268 100644 --- a/c++/src/H5Library.cpp +++ b/c++/src/H5Library.cpp @@ -273,14 +273,6 @@ H5Library::setFreeListLimits(int reg_global_lim, int reg_list_lim, int arr_globa H5Library::H5Library() { } - -//-------------------------------------------------------------------------- -// Function: H5Library destructor -///\brief Noop destructor -//-------------------------------------------------------------------------- -H5Library::~H5Library() -{ -} #endif // DOXYGEN_SHOULD_SKIP_THIS } // namespace H5 diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 37706391558..10e5536bc14 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -62,7 +62,7 @@ class H5_DLLCPP H5Library { H5Library(); // Destructor - ~H5Library(); + ~H5Library() = default; #endif // DOXYGEN_SHOULD_SKIP_THIS }; // end of H5Library diff --git a/c++/src/H5Location.cpp b/c++/src/H5Location.cpp index 8befefc5a13..87eac679238 100644 --- a/c++/src/H5Location.cpp +++ b/c++/src/H5Location.cpp @@ -2367,12 +2367,4 @@ f_DataSpace_setId(DataSpace *dspace, hid_t new_id) dspace->p_setId(new_id); } -//-------------------------------------------------------------------------- -// Function: H5Location destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -H5Location::~H5Location() -{ -} - } // namespace H5 diff --git a/c++/src/H5Location.h b/c++/src/H5Location.h index ee45d679de6..f10a00531f0 100644 --- a/c++/src/H5Location.h +++ b/c++/src/H5Location.h @@ -333,7 +333,7 @@ class H5_DLLCPP H5Location : public IdComponent { #endif // DOXYGEN_SHOULD_SKIP_THIS // Noop destructor. - virtual ~H5Location() override; + virtual ~H5Location() override = default; }; // end of H5Location } // namespace H5 diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 2b898e761ba..54114378e85 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -541,14 +541,4 @@ H5Object::getObjName(H5std_string &obj_name, size_t len) const return name_size; } -#ifndef DOXYGEN_SHOULD_SKIP_THIS -//-------------------------------------------------------------------------- -// Function: H5Object destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -H5Object::~H5Object() -{ -} -#endif // DOXYGEN_SHOULD_SKIP_THIS - } // namespace H5 diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 1e93c0c8268..b2905842ad7 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -124,7 +124,7 @@ class H5_DLLCPP H5Object : public H5Location { virtual void p_setId(const hid_t new_id) override = 0; // Noop destructor. - virtual ~H5Object() override; + virtual ~H5Object() override = default; #endif // DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5OcreatProp.cpp b/c++/src/H5OcreatProp.cpp index 54808cbf929..0f1da1c5a8d 100644 --- a/c++/src/H5OcreatProp.cpp +++ b/c++/src/H5OcreatProp.cpp @@ -199,12 +199,4 @@ ObjCreatPropList::getAttrCrtOrder() const return (crt_order_flags); } -//-------------------------------------------------------------------------- -// Function: ObjCreatPropList destructor -///\brief Noop destructor -//-------------------------------------------------------------------------- -ObjCreatPropList::~ObjCreatPropList() -{ -} - } // namespace H5 diff --git a/c++/src/H5OcreatProp.h b/c++/src/H5OcreatProp.h index 6d752ed9c90..fbe399197fe 100644 --- a/c++/src/H5OcreatProp.h +++ b/c++/src/H5OcreatProp.h @@ -56,7 +56,7 @@ class H5_DLLCPP ObjCreatPropList : public PropList { ObjCreatPropList(const hid_t plist_id); // Noop destructor - virtual ~ObjCreatPropList() override; + virtual ~ObjCreatPropList() override = default; #ifndef DOXYGEN_SHOULD_SKIP_THIS diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index 6aa5b170563..0338a01e016 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -108,15 +108,6 @@ PredType::committed() } #endif // DOXYGEN_SHOULD_SKIP_THIS -// Default destructor -//-------------------------------------------------------------------------- -// Function: PredType destructor -///\brief Noop destructor. -//-------------------------------------------------------------------------- -PredType::~PredType() -{ -} - /***************************************************************************** The following section is regarding the global constants PredType, DataSpace, and PropList. diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index 1e305fc00ae..85b6e96fb0a 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -41,7 +41,7 @@ class H5_DLLCPP PredType : public AtomType { PredType(const PredType &original); // Noop destructor - virtual ~PredType() override; + virtual ~PredType() override = default; /*! \brief This dummy function do not inherit from DataType - it will throw a DataTypeIException if invoked. diff --git a/c++/src/H5StrType.cpp b/c++/src/H5StrType.cpp index 2c47809207e..1b45814f4e7 100644 --- a/c++/src/H5StrType.cpp +++ b/c++/src/H5StrType.cpp @@ -290,12 +290,4 @@ StrType::setStrpad(H5T_str_t strpad) const } } -//-------------------------------------------------------------------------- -// Function: StrType destructor -///\brief Properly terminates access to this string datatype. -//-------------------------------------------------------------------------- -StrType::~StrType() -{ -} - } // namespace H5 diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h index ccae3e750d4..0f51e759aaf 100644 --- a/c++/src/H5StrType.h +++ b/c++/src/H5StrType.h @@ -72,7 +72,7 @@ class H5_DLLCPP StrType : public AtomType { StrType(const StrType &original); // Noop destructor. - virtual ~StrType() override; + virtual ~StrType() override = default; }; // end of StrType } // namespace H5 diff --git a/c++/src/H5VarLenType.cpp b/c++/src/H5VarLenType.cpp index e8b7cbb8c77..49f2cbdd22b 100644 --- a/c++/src/H5VarLenType.cpp +++ b/c++/src/H5VarLenType.cpp @@ -146,12 +146,4 @@ VarLenType::decode() const return (encoded_vltype); } -//-------------------------------------------------------------------------- -// Function: VarLenType destructor -///\brief Properly terminates access to this datatype. -//-------------------------------------------------------------------------- -VarLenType::~VarLenType() -{ -} - } // namespace H5 diff --git a/c++/src/H5VarLenType.h b/c++/src/H5VarLenType.h index 318681aca3b..d7f0ff1aefe 100644 --- a/c++/src/H5VarLenType.h +++ b/c++/src/H5VarLenType.h @@ -52,7 +52,7 @@ class H5_DLLCPP VarLenType : public DataType { VarLenType(const H5Location &loc, const H5std_string &name); // Noop destructor - virtual ~VarLenType() override; + virtual ~VarLenType() override = default; // Default constructor VarLenType(); diff --git a/c++/test/h5cpputil.cpp b/c++/test/h5cpputil.cpp index c3feefaef4c..933aa7da264 100644 --- a/c++/test/h5cpputil.cpp +++ b/c++/test/h5cpputil.cpp @@ -197,13 +197,6 @@ InvalidActionException::InvalidActionException(const H5std_string &func, const H { } -//-------------------------------------------------------------------------- -// Function: InvalidActionException destructor -//-------------------------------------------------------------------------- -InvalidActionException::~InvalidActionException() throw() -{ -} - //-------------------------------------------------------------------------- // Function: TestFailedException default constructor //-------------------------------------------------------------------------- @@ -225,10 +218,3 @@ TestFailedException::TestFailedException(const H5std_string &func, const H5std_s : Exception(func, message) { } - -//-------------------------------------------------------------------------- -// Function: TestFailedException destructor -//-------------------------------------------------------------------------- -TestFailedException::~TestFailedException() throw() -{ -} diff --git a/c++/test/h5cpputil.h b/c++/test/h5cpputil.h index 392382deafe..fa6822ad172 100644 --- a/c++/test/h5cpputil.h +++ b/c++/test/h5cpputil.h @@ -49,14 +49,14 @@ class InvalidActionException : public Exception { public: InvalidActionException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); InvalidActionException(); - ~InvalidActionException() throw() override; + ~InvalidActionException() override = default; }; class TestFailedException : public Exception { public: TestFailedException(const H5std_string &func_name, const H5std_string &message = DEFAULT_MSG); TestFailedException(); - ~TestFailedException() throw() override; + ~TestFailedException() override = default; }; // Overloaded/Template functions to verify values and display proper info