Skip to content

Commit

Permalink
Simplify internal method _open.
Browse files Browse the repository at this point in the history
  • Loading branch information
1uc committed Nov 15, 2023
1 parent 88fcc89 commit a8ad0d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 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
5 changes: 2 additions & 3 deletions include/highfive/bits/H5Node_traits_misc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,11 +396,10 @@ 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 {
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(),
accessProps.getId());
H5P_DEFAULT);
if (id < 0) {
HDF5ErrMapper::ToException<GroupException>(std::string("Unable to open \"") + node_name +
"\":");
Expand Down

0 comments on commit a8ad0d2

Please sign in to comment.