Skip to content

Commit 9999f89

Browse files
author
MarcoFalke
committed
bench: Avoid deprecated use of volatile +=
1 parent 03c8c69 commit 9999f89

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/bench/examples.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ static void Trig(benchmark::Bench& bench)
1313
{
1414
double d = 0.01;
1515
bench.run([&] {
16-
sum += sin(d);
16+
sum = sum + sin(d);
1717
d += 0.000001;
1818
});
1919
}

0 commit comments

Comments
 (0)