summaryrefslogtreecommitdiffstats
path: root/c++/src/H5LcreatProp.cpp
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2021-06-01 13:49:39 (GMT)
committerGitHub <noreply@github.com>2021-06-01 13:49:39 (GMT)
commit50d0888f491821435f6884c0c4c516f69ff67927 (patch)
treecfb3c7737ad9850667771206bc6f457da4e489fb /c++/src/H5LcreatProp.cpp
parent4ef33ef7cd0f2af55b34682b6949a101a68436bb (diff)
downloadhdf5-50d0888f491821435f6884c0c4c516f69ff67927.zip
hdf5-50d0888f491821435f6884c0c4c516f69ff67927.tar.gz
hdf5-50d0888f491821435f6884c0c4c516f69ff67927.tar.bz2
C++ warning and build fixes (#707)
* Committing clang-format changes * C++ build and warning updates * Fixes all warnings on C++ (with gcc 9.3) * Updates CMake and Autotools C++ builds * Undo warning clobber Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'c++/src/H5LcreatProp.cpp')
-rw-r--r--c++/src/H5LcreatProp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/c++/src/H5LcreatProp.cpp b/c++/src/H5LcreatProp.cpp
index 63fe861..3851d56 100644
--- a/c++/src/H5LcreatProp.cpp
+++ b/c++/src/H5LcreatProp.cpp
@@ -121,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");
@@ -146,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);
}
//--------------------------------------------------------------------------