From: Adam Stylinski Date: Sat, 18 May 2024 22:36:33 +0000 (-0400) Subject: Fix a name conflict when compiled with zlib-compat X-Git-Tag: 2.2.0~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80c541b7431af0f6191ba07b203596e3ded217e5;p=thirdparty%2Fzlib-ng.git Fix a name conflict when compiled with zlib-compat The benchmarks fail to compile properly when built with ZLIB_COMPAT. The name of the class cannot have the same name as the function. --- diff --git a/test/benchmarks/benchmark_compress.cc b/test/benchmarks/benchmark_compress.cc index f5eb6198..3d63a441 100644 --- a/test/benchmarks/benchmark_compress.cc +++ b/test/benchmarks/benchmark_compress.cc @@ -19,7 +19,7 @@ extern "C" { #define MAX_SIZE (32 * 1024) -class compress: public benchmark::Fixture { +class compress_bench: public benchmark::Fixture { private: size_t maxlen; uint8_t *inbuff; @@ -59,9 +59,9 @@ public: }; #define BENCHMARK_COMPRESS(name) \ - BENCHMARK_DEFINE_F(compress, name)(benchmark::State& state) { \ + BENCHMARK_DEFINE_F(compress_bench, name)(benchmark::State& state) { \ Bench(state); \ } \ - BENCHMARK_REGISTER_F(compress, name)->Arg(1)->Arg(8)->Arg(16)->Arg(32)->Arg(64)->Arg(512)->Arg(4<<10)->Arg(32<<10); + BENCHMARK_REGISTER_F(compress_bench, name)->Arg(1)->Arg(8)->Arg(16)->Arg(32)->Arg(64)->Arg(512)->Arg(4<<10)->Arg(32<<10); -BENCHMARK_COMPRESS(compress); +BENCHMARK_COMPRESS(compress_bench);