From 781825aeed2c629cedd99b0f4ac4874066d25139 Mon Sep 17 00:00:00 2001 From: Daniel Arndt Date: Fri, 3 Aug 2018 10:32:58 +0200 Subject: [PATCH] Fix warning regarding unused parameter --- include/deal.II/base/utilities.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/include/deal.II/base/utilities.h b/include/deal.II/base/utilities.h index 298ea3f42d..bcb1e8a33f 100644 --- a/include/deal.II/base/utilities.h +++ b/include/deal.II/base/utilities.h @@ -1047,6 +1047,9 @@ namespace Utilities std::vector &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::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)); -- 2.39.5