hdf5: clean up + fixes
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
190032729a
commit
2023d64a5f
5 changed files with 3 additions and 7 deletions
|
@ -71,7 +71,7 @@ namespace CNORXZ
|
|||
|
||||
bool Dataset::exists() const
|
||||
{
|
||||
return H5Lexists(mParent->id(), mName.c_str(), H5P_DEFAULT);
|
||||
return H5Lexists(mParent->id(), mName.c_str(), H5P_DEFAULT) > 0;
|
||||
}
|
||||
|
||||
Dataset& Dataset::init(const RangePtr& dataRange, hid_t type)
|
||||
|
|
|
@ -70,7 +70,6 @@ namespace CNORXZ
|
|||
|
||||
String File::path() const
|
||||
{
|
||||
//return String("/");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace CNORXZ
|
|||
|
||||
bool Group::exists() const
|
||||
{
|
||||
return H5Lexists(mParent->id(), mName.c_str(), H5P_DEFAULT) != 0;
|
||||
return H5Lexists(mParent->id(), mName.c_str(), H5P_DEFAULT) > 0;
|
||||
}
|
||||
|
||||
const ContentPtr& Group::get(const String& name) const
|
||||
|
|
|
@ -92,9 +92,7 @@ namespace CNORXZ
|
|||
|
||||
bool Table::exists() const
|
||||
{
|
||||
htri_t x = H5Lexists(mParent->id(), mName.c_str(), H5P_DEFAULT);
|
||||
VCHECK(x);
|
||||
return x;
|
||||
return H5Lexists(mParent->id(), mName.c_str(), H5P_DEFAULT) > 0;
|
||||
}
|
||||
|
||||
Table& Table::initFieldNames(const Vector<String>& fnames)
|
||||
|
|
|
@ -131,7 +131,6 @@ namespace
|
|||
File h5f(mFileName, false);
|
||||
h5f.open();
|
||||
h5f.getGroup("gr1")->open().addTable("tab1", mTabA, mFs);
|
||||
//h5f.getGroup("gr2")->open().addTable("tab1", mTabA, mFs);
|
||||
h5f.getGroup("moregroups")->open().getGroup("evenmore")->open().getGroup("need")->open().addTable("tab1", mTabA, mFs);
|
||||
h5f.close();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue