From ff352e1721bd8df090687f9e44f6c0987bab6e6f Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Mon, 13 Jan 2025 14:25:38 +0000 Subject: [PATCH] moar format --- include/benchmark/benchmark.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index 85b4065586..5da4e89bf2 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -189,8 +189,6 @@ BENCHMARK(BM_test)->Unit(benchmark::kMillisecond); TypeName(const TypeName&) = delete; \ TypeName& operator=(const TypeName&) = delete -#define BENCHMARK_UNUSED [[maybe_unused]] - // Used to annotate functions, methods and classes so they // are not optimized by the compiler. Useful for tests // where you expect loops to stay in place churning cycles @@ -462,7 +460,7 @@ BENCHMARK_EXPORT Benchmark* RegisterBenchmarkInternal(Benchmark*); // Ensure that the standard streams are properly initialized in every TU. BENCHMARK_EXPORT int InitializeStreams(); -BENCHMARK_UNUSED static int stream_init_anchor = InitializeStreams(); +[[maybe_unused]] static int stream_init_anchor = InitializeStreams(); } // namespace internal @@ -1022,7 +1020,7 @@ inline BENCHMARK_ALWAYS_INLINE bool State::KeepRunningInternal(IterationCount n, } struct State::StateIterator { - struct BENCHMARK_UNUSED Value{}; + struct [[maybe_unused]] Value {}; typedef std::forward_iterator_tag iterator_category; typedef Value value_type; typedef Value reference; @@ -1447,7 +1445,7 @@ class Fixture : public internal::Benchmark { #define BENCHMARK_PRIVATE_DECLARE(n) \ /* NOLINTNEXTLINE(misc-use-anonymous-namespace) */ \ static ::benchmark::internal::Benchmark* BENCHMARK_PRIVATE_NAME(n) \ - BENCHMARK_UNUSED + [[maybe_unused]] #define BENCHMARK(...) \ BENCHMARK_PRIVATE_DECLARE(_benchmark_) = \