]> https://gitweb.dealii.org/ - dealii.git/commitdiff
No need to explicity call 'close()' at the end of a scope. 17297/head
authorWolfgang Bangerth <bangerth@colostate.edu>
Thu, 18 Jul 2024 23:15:14 +0000 (17:15 -0600)
committerWolfgang Bangerth <bangerth@colostate.edu>
Sat, 20 Jul 2024 03:08:23 +0000 (21:08 -0600)
source/grid/tria.cc

index 87623aa531d4705a5b6a5827ab3546c15ee4ff05..ba3a0d318b53e11213b215344858b4c44145ce40 100644 (file)
@@ -869,8 +869,6 @@ namespace internal
           // Write packed data.
           file.write(reinterpret_cast<const char *>(src_data_fixed.data()),
                      src_data_fixed.size() * sizeof(char));
-
-          file.close();
         }
 
         //
@@ -893,8 +891,6 @@ namespace internal
             // Write packed data.
             file.write(reinterpret_cast<const char *>(src_data_variable.data()),
                        src_data_variable.size() * sizeof(char));
-
-            file.close();
           }
       }
   }
@@ -1093,8 +1089,6 @@ namespace internal
           // Read packed data.
           file.read(reinterpret_cast<char *>(dest_data_fixed.data()),
                     dest_data_fixed.size() * sizeof(char));
-
-          file.close();
         }
 
         //
@@ -1121,8 +1115,6 @@ namespace internal
             dest_data_variable.resize(size);
             file.read(reinterpret_cast<char *>(dest_data_variable.data()),
                       dest_data_variable.size() * sizeof(char));
-
-            file.close();
           }
       }
   }

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.