]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Use AssertNothrow in custom deleters 7736/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 19 Feb 2019 20:00:48 +0000 (21:00 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Tue, 19 Feb 2019 20:00:48 +0000 (21:00 +0100)
source/base/hdf5.cc

index 9e061c766432c082f1a56409e9b70012b12c8434..d325558399663c2b115d260b295d9c80a423f2f8 100644 (file)
@@ -70,7 +70,7 @@ namespace HDF5
           t_type  = std::shared_ptr<hid_t>(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<hid_t>(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<hid_t>(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<hid_t>(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<hid_t>(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<hid_t>(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<hid_t>(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<hid_t>(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;
     });

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.