diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2001-12-12 19:29:14 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2001-12-12 19:29:14 (GMT) |
commit | fd48265a02402e3911dadf4dc6895daa1eb39543 (patch) | |
tree | 1a9d16abc3f3a9fbc7c41f7fc39dafea67988e27 /c++ | |
parent | 47d88766dbee3c631c842639d44c362c2b7b8e44 (diff) | |
download | hdf5-fd48265a02402e3911dadf4dc6895daa1eb39543.zip hdf5-fd48265a02402e3911dadf4dc6895daa1eb39543.tar.gz hdf5-fd48265a02402e3911dadf4dc6895daa1eb39543.tar.bz2 |
[svn-r4707]
Purpose:
Bug fixing
Description:
H5IdComponent::operator= shouldn't be virtual because the subclass'
operator= have different type for the rhs argument. Removed virtual
Platforms tested:
SunOS 5.7 (arabica)
IRIX64 (modi4) - only tested that the warnings went away, still working
on other configuration problems.
Diffstat (limited to 'c++')
-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 } |