From: Daniel Arndt Date: Tue, 19 Feb 2019 20:00:48 +0000 (+0100) Subject: Use AssertNothrow in custom deleters X-Git-Tag: v9.1.0-rc1~325^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44cd2cedb50036b8e19fd5cd4fd85413b02cd2e7;p=dealii.git Use AssertNothrow in custom deleters --- diff --git a/source/base/hdf5.cc b/source/base/hdf5.cc index 9e061c7664..d325558399 100644 --- a/source/base/hdf5.cc +++ b/source/base/hdf5.cc @@ -70,7 +70,7 @@ namespace HDF5 t_type = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Tclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); @@ -91,7 +91,7 @@ namespace HDF5 t_type = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Tclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); @@ -603,14 +603,14 @@ namespace HDF5 hdf5_reference = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Dclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); dataspace = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Sclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); @@ -658,14 +658,14 @@ namespace HDF5 hdf5_reference = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Dclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); dataspace = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Sclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); @@ -1296,7 +1296,7 @@ namespace HDF5 hdf5_reference = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t ret = H5Gclose(*pointer); - Assert(ret >= 0, ExcInternalError()); + AssertNothrow(ret >= 0, ExcInternalError()); (void)ret; delete pointer; }); @@ -1399,7 +1399,7 @@ namespace HDF5 hdf5_reference = std::shared_ptr(new hid_t, [](hid_t *pointer) { // Release the HDF5 resource const herr_t err = H5Fclose(*pointer); - Assert(err >= 0, ExcInternalError()); + AssertNothrow(err >= 0, ExcInternalError()); (void)err; delete pointer; });