]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Enhanced compatibility with Intel 19. 7545/head
authorMarc Fehling <marc.fehling@gmx.net>
Sun, 23 Dec 2018 03:21:09 +0000 (04:21 +0100)
committerMarc Fehling <marc.fehling@gmx.net>
Sun, 23 Dec 2018 03:21:09 +0000 (04:21 +0100)
include/deal.II/base/utilities.h
source/dofs/dof_tools.cc

index e1598c2787afde94c027ac1e4e1f11f73e433c16..59cd5be3d5dcc928a6a70a40118b3daa48284561 100644 (file)
@@ -1213,6 +1213,8 @@ namespace Utilities
          const std::vector<char>::const_iterator &cend,
          const bool                               allow_compression)
   {
+    T object;
+
     // the data is never compressed when we can't use zlib.
     (void)allow_compression;
 
@@ -1234,14 +1236,11 @@ namespace Utilities
 #endif
       {
         Assert(std::distance(cbegin, cend) == sizeof(T), ExcInternalError());
-        T object;
         std::memcpy(&object, &*cbegin, sizeof(T));
-        return object;
       }
     else
       {
         std::string decompressed_buffer;
-        T           object;
 
         // first decompress the buffer
 #ifdef DEAL_II_WITH_ZLIB
@@ -1264,8 +1263,9 @@ namespace Utilities
         boost::archive::binary_iarchive archive(in);
 
         archive >> object;
-        return object;
       }
+
+    return object;
   }
 
 
index 93e76a220d44ceef98f34066ce9551754a77a70c..3ce175aeb21debeed329a877fc2f27335c7447ea 100644 (file)
@@ -1385,7 +1385,7 @@ namespace DoFTools
          &dof_handler.get_triangulation()) == nullptr ?
          [&dof_handler]() {
            unsigned int max_subdomain_id = 0;
-           for (auto cell : dof_handler.active_cell_iterators())
+           for (const auto &cell : dof_handler.active_cell_iterators())
              max_subdomain_id =
                std::max(max_subdomain_id, cell->subdomain_id());
            return max_subdomain_id + 1;

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.