From f4009ef8e3c3b29e3fb3b8846b42f58e0e23a5a2 Mon Sep 17 00:00:00 2001 From: Dominic Hamon Date: Tue, 7 Nov 2017 10:30:17 -0800 Subject: [PATCH] Fix #476. Explicit coersion of size_t to boolean (#477) --- include/benchmark/benchmark.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/benchmark/benchmark.h b/include/benchmark/benchmark.h index d529e4bf..f4e87620 100644 --- a/include/benchmark/benchmark.h +++ b/include/benchmark/benchmark.h @@ -433,7 +433,7 @@ class State { if (BENCHMARK_BUILTIN_EXPECT(!started_, false)) { StartKeepRunning(); } - bool const res = --total_iterations_; + bool const res = (--total_iterations_ != 0); if (BENCHMARK_BUILTIN_EXPECT(!res, false)) { FinishKeepRunning(); }