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 committed May 18, 2024
1 parent 4af7963 commit f56ee85
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 f56ee85

Please sign in to comment.