diff options
| author | practicalswift <[email protected]> | 2017-11-10 14:43:41 +0100 |
|---|---|---|
| committer | practicalswift <[email protected]> | 2017-11-13 22:37:13 +0100 |
| commit | 069215ebe2d9c7cce7cee74b1f13f6e0daf552e9 (patch) | |
| tree | 24b161b44008071f40281c836101c421cac677a8 | |
| parent | Merge #10749: Use compile-time constants instead of unnamed enumerations (rem... (diff) | |
| download | discoin-069215ebe2d9c7cce7cee74b1f13f6e0daf552e9.tar.xz discoin-069215ebe2d9c7cce7cee74b1f13f6e0daf552e9.zip | |
Initialize recently introduced non-static class member lastCycles to zero in constructor
lastCycles was introduced in 35328187463a7078b4206e394c21d5515929c7de which was merged into master yesterday.
Also initialize beginCycles to zero for consistency and completeness.
| -rw-r--r-- | src/bench/bench.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bench/bench.h b/src/bench/bench.h index ab5c3d560..071a5dc9c 100644 --- a/src/bench/bench.h +++ b/src/bench/bench.h @@ -59,12 +59,17 @@ namespace benchmark { uint64_t minCycles; uint64_t maxCycles; public: - State(std::string _name, duration _maxElapsed) : name(_name), maxElapsed(_maxElapsed), count(0) { - minTime = duration::max(); - maxTime = duration::zero(); - minCycles = std::numeric_limits<uint64_t>::max(); - maxCycles = std::numeric_limits<uint64_t>::min(); - countMask = 1; + State(std::string _name, duration _maxElapsed) : + name(_name), + maxElapsed(_maxElapsed), + minTime(duration::max()), + maxTime(duration::zero()), + count(0), + countMask(1), + beginCycles(0), + lastCycles(0), + minCycles(std::numeric_limits<uint64_t>::max()), + maxCycles(std::numeric_limits<uint64_t>::min()) { } bool KeepRunning(); }; |