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 3532818746 which was merged into master yesterday.

  Friendly ping  @laanwj :-)

Tree-SHA512: cb93b6a8f6e2e3b06cd05a635da95c84f3df64c21fc23fe82f98306ea571badc32040315b563e46ddb5203128226bc334269acd497beead5a5777c434060fd85
This commit is contained in:
Wladimir J. van der Laan 2017-11-16 11:49:37 +01:00
commit 084f52f38d
No known key found for this signature in database
GPG key ID: 1E4AED62986CD25D

View file

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