diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-11-16 11:49:37 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-11-16 11:49:42 +0100 |
commit | 084f52f38dc2f08d7ee067d376af66858d010ccf (patch) | |
tree | 39438feef10073add01f39fa8e792b516a8b53b2 /src/bench | |
parent | 66d46c7901b7a9b18d1ab0ce7c64ada9b46c1236 (diff) | |
parent | 069215ebe2d9c7cce7cee74b1f13f6e0daf552e9 (diff) |
Merge #11654: tests: Initialize recently introduced non-static class member lastCycles to zero in constructor
069215e Initialize recently introduced non-static class member lastCycles to zero in constructor (practicalswift)
Pull request description:
Initialize recently introduced non-static class member `lastCycles` to zero in constructor.
`lastCycles` was introduced in 35328187463a7078b4206e394c21d5515929c7de which was merged into master yesterday.
Friendly ping @laanwj :-)
Tree-SHA512: cb93b6a8f6e2e3b06cd05a635da95c84f3df64c21fc23fe82f98306ea571badc32040315b563e46ddb5203128226bc334269acd497beead5a5777c434060fd85
Diffstat (limited to 'src/bench')
-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 ab5c3d5604..071a5dc9c7 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(); }; |