diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-08-24 18:46:39 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2017-08-24 18:46:39 (GMT) |
commit | 0e44181bbb9797bdf4c7b2c192a457639a4e5ea1 (patch) | |
tree | 0a2a276797b42ed90291f69de87f8b65b9578bf2 /c++/src/H5Object.cpp | |
parent | a6d5bf1a86250cc660cd1ed420eeda6940792be5 (diff) | |
download | hdf5-0e44181bbb9797bdf4c7b2c192a457639a4e5ea1.zip hdf5-0e44181bbb9797bdf4c7b2c192a457639a4e5ea1.tar.gz hdf5-0e44181bbb9797bdf4c7b2c192a457639a4e5ea1.tar.bz2 |
Miscellaneous improvements
Description:
Moved H5Location::getNumObjs to Group::getNumObjs (i.e., H5Gget_info)
Switched reinterpret_cast to static_cast in H5Object::iterateAttrs
Miscellaneous cleanup
Platforms tested:
Linux/32 2.6 (jam)
Linux/64 (platypus)
Darwin (osx1010test)
Diffstat (limited to 'c++/src/H5Object.cpp')
-rw-r--r-- | c++/src/H5Object.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/c++/src/H5Object.cpp b/c++/src/H5Object.cpp index 865d04f..81e61e8 100644 --- a/c++/src/H5Object.cpp +++ b/c++/src/H5Object.cpp @@ -44,10 +44,10 @@ namespace H5 { extern "C" herr_t userAttrOpWrpr(hid_t loc_id, const char *attr_name, const H5A_info_t *ainfo, void *op_data) { - H5std_string s_attr_name = H5std_string(attr_name); - UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data); - myData->op(*myData->location, s_attr_name, myData->opData); - return 0; + H5std_string s_attr_name = H5std_string(attr_name); + UserData4Aiterate* myData = reinterpret_cast<UserData4Aiterate *> (op_data); + myData->op(*myData->location, s_attr_name, myData->opData); + return 0; } //-------------------------------------------------------------------------- @@ -81,6 +81,7 @@ H5Object::H5Object() : H5Location() {} // This constructor is no longer appropriate because the data member "id" had // been moved to the sub-classes. It is removed from 1.8.15 because it is // a noop and it can be generated by the compiler if needed. +// Removed in 1.10.1 - Aug 2016 //-------------------------------------------------------------------------- // H5Object::H5Object(const H5Object& original) : H5Location() {} @@ -148,7 +149,7 @@ Attribute H5Object::createAttribute(const char* name, const DataType& data_type, //-------------------------------------------------------------------------- Attribute H5Object::createAttribute(const H5std_string& name, const DataType& data_type, const DataSpace& data_space, const PropList& create_plist) const { - return(createAttribute( name.c_str(), data_type, data_space, create_plist)); + return(createAttribute(name.c_str(), data_type, data_space, create_plist)); } //-------------------------------------------------------------------------- @@ -183,7 +184,7 @@ Attribute H5Object::openAttribute(const char* name) const //-------------------------------------------------------------------------- Attribute H5Object::openAttribute(const H5std_string& name) const { - return(openAttribute( name.c_str())); + return(openAttribute(name.c_str())); } //-------------------------------------------------------------------------- @@ -239,7 +240,7 @@ int H5Object::iterateAttrs(attr_operator_t user_op, unsigned *_idx, void *op_dat // call the C library routine H5Aiterate2 to iterate the attributes hsize_t idx = _idx ? static_cast<hsize_t>(*_idx) : 0; int ret_value = H5Aiterate2(getId(), H5_INDEX_NAME, H5_ITER_INC, &idx, - userAttrOpWrpr, reinterpret_cast<void *>(userData)); + userAttrOpWrpr, static_cast<void *>(userData)); // release memory delete userData; |