From: Luca Heltai Date: Fri, 17 Jan 2020 22:26:12 +0000 (+0100) Subject: Fix compilation when zlib is not available. X-Git-Tag: v9.2.0-rc1~637^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F9371%2Fhead;p=dealii.git Fix compilation when zlib is not available. --- 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);