summaryrefslogtreecommitdiffstats
path: root/c++/src/H5LcreatProp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/src/H5LcreatProp.cpp')
-rw-r--r--c++/src/H5LcreatProp.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp
index 29721c1..3851d56 100644
--- a/c++/src/H5LcreatProp.cpp
+++ b/c++/src/H5LcreatProp.cpp
@@ -70,8 +70,7 @@ LinkCreatPropList::getConstant()
void
LinkCreatPropList::deleteConstants()
{
- if (DEFAULT_ != 0)
- delete DEFAULT_;
+ delete DEFAULT_;
}
//--------------------------------------------------------------------------
@@ -122,7 +121,7 @@ LinkCreatPropList::LinkCreatPropList(const hid_t plist_id) : PropList(plist_id)
void
LinkCreatPropList::setCreateIntermediateGroup(bool crt_intmd_group) const
{
- herr_t ret_value = H5Pset_create_intermediate_group(id, (unsigned)crt_intmd_group);
+ herr_t ret_value = H5Pset_create_intermediate_group(id, static_cast<unsigned>(crt_intmd_group));
// Throw exception if H5Pset_create_intermediate_group returns failure
if (ret_value < 0) {
throw PropListIException("setCreateIntermediateGroup", "H5Pset_create_intermediate_group failed");
@@ -147,7 +146,7 @@ LinkCreatPropList::getCreateIntermediateGroup() const
throw PropListIException("getCreateIntermediateGroup", "H5Pget_create_intermediate_group failed");
}
- return ((bool)crt_intmd_group);
+ return static_cast<bool>(crt_intmd_group);
}
//--------------------------------------------------------------------------