Fix #476. Explicit coersion of size_t to boolean (#477)

This commit is contained in:
Dominic Hamon 2017-11-07 10:30:17 -08:00 committed by GitHub
parent 72a4581caf
commit f4009ef8e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}