diff options
Diffstat (limited to 'c++/src/H5DataType.cpp')
-rw-r--r-- | c++/src/H5DataType.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/c++/src/H5DataType.cpp b/c++/src/H5DataType.cpp index afc5678..a435b4e 100644 --- a/c++/src/H5DataType.cpp +++ b/c++/src/H5DataType.cpp @@ -53,7 +53,7 @@ namespace H5 { ///\brief Default constructor: Creates a stub datatype // Programmer Binh-Minh Ribler - 2000 //-------------------------------------------------------------------------- -DataType::DataType() : H5Object(), id(0) {} +DataType::DataType() : H5Object(), id(H5I_INVALID_HID) {} //-------------------------------------------------------------------------- // Function: DataType overloaded constructor @@ -105,7 +105,7 @@ DataType::DataType( const H5T_class_t type_class, size_t size ) : H5Object() // Jul, 2008 // Added for application convenience. //-------------------------------------------------------------------------- -DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(0) +DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID) { id = H5Location::p_dereference(loc.getId(), ref, ref_type, plist, "constructor - by dereference"); } @@ -124,7 +124,7 @@ DataType::DataType(const H5Location& loc, const void* ref, H5R_type_t ref_type, // Jul, 2008 // Added for application convenience. //-------------------------------------------------------------------------- -DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(0) +DataType::DataType(const Attribute& attr, const void* ref, H5R_type_t ref_type, const PropList& plist) : H5Object(), id(H5I_INVALID_HID) { id = H5Location::p_dereference(attr.getId(), ref, ref_type, plist, "constructor - by dereference"); } @@ -710,7 +710,7 @@ void DataType::close() throw DataTypeIException(inMemFunc("close"), "H5Tclose failed"); } // reset the id - id = 0; + id = H5I_INVALID_HID; } } |