From 1880e8511e3067480051e7e01839cb7771761edf Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 30 Jun 2016 18:47:32 -0700 Subject: [PATCH] Don't use named variadic macro parameters Summary: MSVC doesn't support them, so use `__VA_ARGS__` instead. Reviewed By: yfeldblum Differential Revision: D3507071 fbshipit-source-id: 186834c87e74257c709fcbc08e3bda7b1b55d02b --- folly/test/DeterministicSchedule.h | 11 ++++++----- folly/test/SharedMutexTest.cpp | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/folly/test/DeterministicSchedule.h b/folly/test/DeterministicSchedule.h index b04e613a..c6a1aeb2 100644 --- a/folly/test/DeterministicSchedule.h +++ b/folly/test/DeterministicSchedule.h @@ -37,11 +37,12 @@ namespace test { // This is ugly, but better perf for DeterministicAtomic translates // directly to more states explored and tested -#define FOLLY_TEST_DSCHED_VLOG(msg...) \ - do { \ - if (false) { \ - VLOG(2) << std::hex << std::this_thread::get_id() << ": " << msg; \ - } \ +#define FOLLY_TEST_DSCHED_VLOG(...) \ + do { \ + if (false) { \ + VLOG(2) << std::hex << std::this_thread::get_id() << ": " \ + << __VA_ARGS__; \ + } \ } while (false) /** diff --git a/folly/test/SharedMutexTest.cpp b/folly/test/SharedMutexTest.cpp index da567f83..43e6dd17 100644 --- a/folly/test/SharedMutexTest.cpp +++ b/folly/test/SharedMutexTest.cpp @@ -1371,8 +1371,8 @@ BENCHMARK(single_thread_lock_unlock, iters) { } } -#define BENCH_BASE(args...) BENCHMARK_NAMED_PARAM(args) -#define BENCH_REL(args...) BENCHMARK_RELATIVE_NAMED_PARAM(args) +#define BENCH_BASE(...) BENCHMARK_NAMED_PARAM(__VA_ARGS__) +#define BENCH_REL(...) BENCHMARK_RELATIVE_NAMED_PARAM(__VA_ARGS__) // 100% reads. Best-case scenario for deferred locks. Lock is colocated // with read data, so inline lock takes cache miss every time but deferred -- 2.34.1