Skip to content

Commit

Permalink
Simplify internal method _open. (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc authored Nov 16, 2023
1 parent 0bf1f83 commit 640a713
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions include/highfive/bits/H5Node_traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,7 @@ class NodeTraits {
bool _exist(const std::string& node_name, bool raise_errors = true) const;

// Opens an arbitrary object to obtain info
Object _open(const std::string& node_name,
const DataSetAccessProps& accessProps = DataSetAccessProps::Default()) const;
Object _open(const std::string& node_name) const;
};


Expand Down
8 changes: 3 additions & 5 deletions include/highfive/bits/H5Node_traits_misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,9 @@ inline void NodeTraits<Derivate>::createHardLink(const std::string& link_name,


template <typename Derivate>
inline Object NodeTraits<Derivate>::_open(const std::string& node_name,
const DataSetAccessProps& accessProps) const {
const auto id = H5Oopen(static_cast<const Derivate*>(this)->getId(),
node_name.c_str(),
accessProps.getId());
inline Object NodeTraits<Derivate>::_open(const std::string& node_name) const {
const auto id =
H5Oopen(static_cast<const Derivate*>(this)->getId(), node_name.c_str(), H5P_DEFAULT);
if (id < 0) {
HDF5ErrMapper::ToException<GroupException>(std::string("Unable to open \"") + node_name +
"\":");
Expand Down

0 comments on commit 640a713

Please sign in to comment.