diff options
-rw-r--r-- | c++/src/H5DataType.cpp | 10 | ||||
-rw-r--r-- | c++/src/H5DataType.h | 5 | ||||
-rw-r--r-- | c++/src/H5IdComponent.h | 2 | ||||
-rw-r--r-- | c++/src/H5PredType.cpp | 5 | ||||
-rw-r--r-- | c++/src/H5PredType.h | 2 |
5 files changed, 7 insertions, 17 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index a7de20b..bef66f3 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -76,14 +76,6 @@ DataType& DataType::operator=( const DataType& rhs ) return(*this); } -// Makes a copy of the predefined type and stores the new -// id in the left hand side object. -DataType& DataType::operator=( const PredType& rhs ) -{ - copy(rhs); - return(*this); -} - // Determines whether two datatypes refer to the same actual datatype. bool DataType::operator==(const DataType& compared_type ) const { @@ -108,7 +100,7 @@ bool DataType::operator==(const DataType& compared_type ) const //{ //} -// Creates a new variable-length datatype - Note: make it inheritance??? +// Creates a new variable-length datatype - Note: should use inheritance - // work in progress //DataType DataType::vlenCreate( const DataType& base_type ) //{ diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index ebe7ded..0b9d877 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -42,11 +42,8 @@ class DataType : public H5Object { // Returns a pointer to the current global overflow function. H5T_overflow_t getOverflow(void) const; - // Assignment operator that takes a predefined type - virtual DataType& operator=( const PredType& rhs ); - // Assignment operator - virtual DataType& operator=( const DataType& rhs ); + DataType& operator=( const DataType& rhs ); // Determines whether two datatypes are the same. bool operator==(const DataType& compared_type ) const; diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 31e9acd..09a227b 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -42,7 +42,7 @@ class IdComponent { bool noReference(); // Assignment operator - virtual IdComponent& operator=( const IdComponent& rhs ); + IdComponent& operator=( const IdComponent& rhs ); // Resets this IdComponent instance //template <class Type> diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp index d883ba5..885412c 100644 --- a/c++/src/H5PredType.cpp +++ b/c++/src/H5PredType.cpp @@ -29,9 +29,10 @@ PredType::PredType( const PredType& original ) : AtomType( original ) {} // Makes a copy of the predefined type and stores the new // id in the left hand side object. -DataType& PredType::operator=( const PredType& rhs ) +PredType& PredType::operator=( const PredType& rhs ) { - return(DataType::operator=(rhs)); + copy(rhs); + return(*this); } const PredType PredType::NotAtexit; // only for atexit/global dest. problem diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index eabb34a..8c0fbf0 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -227,7 +227,7 @@ class PredType : public AtomType { // Makes a copy of the predefined type and stores the new // id in the left hand side object. - DataType& operator=( const PredType& rhs ); + PredType& operator=( const PredType& rhs ); }; #ifndef H5_NO_NAMESPACE } |