Fix 'DoNotOptimize<int>' is deprecated issue.

Change-Id: Ia25b7f73882d45bd2f1a606f51569269ece25fe0
Bug: None
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/298042
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Jeremy Leconte <jleconte@google.com>
Cr-Commit-Position: refs/heads/main@{#39589}
This commit is contained in:
Jeremy Leconte 2023-03-17 14:30:41 +01:00 committed by WebRTC LUCI CQ
parent 5dc09587fa
commit 022d4ec34a

View file

@ -38,7 +38,8 @@ void BM_LockWithMutex(benchmark::State& state) {
static PerfTestData test_data;
for (auto s : state) {
RTC_UNUSED(s);
benchmark::DoNotOptimize(test_data.AddToCounter(2));
int add_to_counter = test_data.AddToCounter(2);
benchmark::DoNotOptimize(add_to_counter);
}
}