From cf1bbfb3cd35b11d4504bd5b2f4ea679859d4963 Mon Sep 17 00:00:00 2001 From: Luca Heltai Date: Fri, 17 Jan 2020 23:26:12 +0100 Subject: [PATCH] Fix compilation when zlib is not available. --- include/deal.II/base/utilities.h | 5 +---- source/base/utilities.cc | 5 +++-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/deal.II/base/utilities.h b/include/deal.II/base/utilities.h index 18e267d901..bb75635629 100644 --- a/include/deal.II/base/utilities.h +++ b/include/deal.II/base/utilities.h @@ -145,16 +145,13 @@ namespace Utilities * is identical to the input string. * * @param[in] input The string to compress - * @param[in] compression_level The compression level at which we compress * * @return A compressed version of the input string * * @authors Luca Heltai, Nicola Giuliani, 2020 */ std::string - compress( - const std::string &input, - const int compression_level = boost::iostreams::gzip::default_compression); + compress(const std::string &input); /** * If the library is configured with ZLIB, then this function assumes that the diff --git a/source/base/utilities.cc b/source/base/utilities.cc index f38c36d5a3..af0f9120c6 100644 --- a/source/base/utilities.cc +++ b/source/base/utilities.cc @@ -381,7 +381,7 @@ namespace Utilities std::string - compress(const std::string &input, const int compression_level) + compress(const std::string &input) { #ifdef DEAL_II_WITH_ZLIB namespace bio = boost::iostreams; @@ -390,7 +390,8 @@ namespace Utilities std::stringstream origin(input); bio::filtering_streambuf out; - out.push(bio::gzip_compressor(bio::gzip_params(compression_level))); + out.push(bio::gzip_compressor( + bio::gzip_params(boost::iostreams::gzip::default_compression))); out.push(origin); bio::copy(out, compressed); -- 2.39.5