Skip to content

Commit

Permalink
Fix a name conflict when compiled with zlib-compat
Browse files Browse the repository at this point in the history
The benchmarks fail to compile properly when built with ZLIB_COMPAT.
The name of the class cannot have the same name as the function.
  • Loading branch information
KungFuJesus authored and Dead2 committed May 19, 2024
1 parent 1a15c4b commit 80c541b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/benchmarks/benchmark_compress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -59,9 +59,9 @@ class compress: public benchmark::Fixture {
};

#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);

0 comments on commit 80c541b

Please sign in to comment.