From c72256e555d879659d7a9cdd8df5f727d899d872 Mon Sep 17 00:00:00 2001 From: Kenneth Moreland Date: Mon, 13 May 2024 08:20:44 -0600 Subject: [PATCH] Fix deprecation warning from Google benchmark The warning is that asking not to optimize a const variable does not always work. Fix by simply not declaring the variable as const. --- benchmarking/BenchmarkDeviceAdapter.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarking/BenchmarkDeviceAdapter.cxx b/benchmarking/BenchmarkDeviceAdapter.cxx index b2c951d8e..ac15a4a2e 100644 --- a/benchmarking/BenchmarkDeviceAdapter.cxx +++ b/benchmarking/BenchmarkDeviceAdapter.cxx @@ -541,7 +541,7 @@ void BenchCountSetBitsImpl(benchmark::State& state, { (void)_; timer.Start(); - const vtkm::Id setBits = vtkm::cont::Algorithm::CountSetBits(Config.Device, bits); + vtkm::Id setBits = vtkm::cont::Algorithm::CountSetBits(Config.Device, bits); benchmark::DoNotOptimize(setBits); timer.Stop();