]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Fix warning regarding unused parameter 7024/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 3 Aug 2018 08:32:58 +0000 (10:32 +0200)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 3 Aug 2018 08:32:58 +0000 (10:32 +0200)
include/deal.II/base/utilities.h

index 298ea3f42dfdaa3ae44c2b71fbc19ca449809f4e..bcb1e8a33fb7f411cb05a63728ffb8ca35ae5fd4 100644 (file)
@@ -1047,6 +1047,9 @@ namespace Utilities
        std::vector<char> &dest_buffer,
        const bool         allow_compression)
   {
+    // the data is never compressed when we can't use zlib.
+    (void)allow_compression;
+
     // see if the object is small and copyable via memcpy. if so, use
     // this fast path. otherwise, we have to go through the BOOST
     // serialization machinery
@@ -1064,7 +1067,6 @@ namespace Utilities
 #  endif
 #endif
       {
-        (void)allow_compression;
         const size_t previous_size = dest_buffer.size();
         dest_buffer.resize(previous_size + sizeof(T));
 
@@ -1123,6 +1125,9 @@ namespace Utilities
          const std::vector<char>::const_iterator &cend,
          const bool                               allow_compression)
   {
+    // the data is never compressed when we can't use zlib.
+    (void)allow_compression;
+
     // see if the object is small and copyable via memcpy. if so, use
     // this fast path. otherwise, we have to go through the BOOST
     // serialization machinery
@@ -1140,7 +1145,6 @@ namespace Utilities
 #  endif
 #endif
       {
-        (void)allow_compression;
         Assert(std::distance(cbegin, cend) == sizeof(T), ExcInternalError());
         T object;
         std::memcpy(&object, &*cbegin, sizeof(T));

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.