Assert that what might look like a possible division by zero is actually unreachable

This commit is contained in:
practicalswift committed 2017-02-02 10:43:48 +01:00
1 parent 02e5308c1b
commit db07f91899
1 file changed
+2
+2
View File
@@ -92,6 +92,8 @@ bool benchmark::State::KeepRunning()
--count;
assert(count != 0 && "count == 0 => (now == 0 && beginTime == 0) => return above");
// Output results
double average = (now-beginTime)/count;
int64_t averageCycles = (nowCycles-beginCycles)/count;