summaryrefslogtreecommitdiffstats
path: root/c++/src/H5PredType.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2006-05-23 17:59:40 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2006-05-23 17:59:40 (GMT)
commitdeec486732b7c8646cc0a2614a62b85fff336fe0 (patch)
treee2c2b4e6a939ed9aabb75b684dfdd89b9f84e148 /c++/src/H5PredType.cpp
parentd0f565c5c0370424ac78a127f31a60396d280b95 (diff)
downloadhdf5-deec486732b7c8646cc0a2614a62b85fff336fe0.zip
hdf5-deec486732b7c8646cc0a2614a62b85fff336fe0.tar.gz
hdf5-deec486732b7c8646cc0a2614a62b85fff336fe0.tar.bz2
[svn-r12368] Purpose: Fixed bug
Description: Shanti compiler destroy unnamed objects later than others, which caused some reference counting test fail. Revised the test so that destructors are called at the same time, regardless the differences of compiler implementation. Revised some constructors, close, operator=, and destructors to make sure that all the object ids are handled properly. Platforms tested: Linux 2.4 (heping) SunOS 5.9 (shanti) HPUX 11.00 (kelgia) AIX 5.1 (copper)
Diffstat (limited to 'c++/src/H5PredType.cpp')
-rw-r--r--c++/src/H5PredType.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/c++/src/H5PredType.cpp b/c++/src/H5PredType.cpp
index 6f1e5df..510c659 100644
--- a/c++/src/H5PredType.cpp
+++ b/c++/src/H5PredType.cpp
@@ -237,8 +237,11 @@ const PredType PredType::NATIVE_UINT_LEAST64( H5T_NATIVE_UINT_LEAST64 );
//--------------------------------------------------------------------------
PredType& PredType::operator=( const PredType& rhs )
{
- copy(rhs);
- return(*this);
+ if (this != &rhs)
+ {
+ copy(rhs);
+ return(*this);
+ }
}
#ifndef DOXYGEN_SHOULD_SKIP_THIS