From 9bb6063332852d72583faa7ae2954ca6450402c0 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Sat, 30 Mar 2024 14:12:00 +0800 Subject: [PATCH] update: adapt to old compilers --- benchmark.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/benchmark.cc b/benchmark.cc index 71c8637..6fb9903 100644 --- a/benchmark.cc +++ b/benchmark.cc @@ -12,14 +12,16 @@ std::string build_test_data() { } static void MD5_Digest(benchmark::State &state) { - for (constexpr MD5 md5; auto _ : state) { + constexpr MD5 md5; + for (auto _ : state) { auto volatile holder = md5.Digest(); } } static void MD5_Update(benchmark::State &state) { + MD5 md5; const auto data = build_test_data(); - for (MD5 md5; auto _ : state) { + for (auto _ : state) { md5.Update(data.c_str(), state.range(0)); } }