From 94c7e288353edad2bcefb849043bc0029e03c4ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 16 Jun 2018 22:24:44 +0200 Subject: [PATCH] Renamed _numberOfResults --- lib/timer.cpp | 6 +++--- lib/timer.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/timer.cpp b/lib/timer.cpp index 44d71043f..0a43eafdf 100644 --- a/lib/timer.cpp +++ b/lib/timer.cpp @@ -53,10 +53,10 @@ void TimerResults::ShowResults(SHOWTIME_MODES mode) const size_t ordinal = 1; // maybe it would be nice to have an ordinal in output later! for (std::vector::const_iterator iter=data.begin() ; iter!=data.end(); ++iter) { const double sec = iter->second.seconds(); - const double secAverage = sec / (double)(iter->second._numberOfResults); + const double secAverage = sec / (double)(iter->second.mNumberOfResults); overallData._clocks += iter->second._clocks; if ((mode != SHOWTIME_TOP5) || (ordinal<=5)) { - std::cout << iter->first << ": " << sec << "s (avg. " << secAverage << "s - " << iter->second._numberOfResults << " result(s))" << std::endl; + std::cout << iter->first << ": " << sec << "s (avg. " << secAverage << "s - " << iter->second.mNumberOfResults << " result(s))" << std::endl; } ++ordinal; } @@ -68,7 +68,7 @@ void TimerResults::ShowResults(SHOWTIME_MODES mode) const void TimerResults::AddResults(const std::string& str, std::clock_t clocks) { _results[str]._clocks += clocks; - _results[str]._numberOfResults++; + _results[str].mNumberOfResults++; } Timer::Timer(const std::string& str, unsigned int showtimeMode, TimerResultsIntf* timerResults) diff --git a/lib/timer.h b/lib/timer.h index e4a4fb39f..cff81ebad 100644 --- a/lib/timer.h +++ b/lib/timer.h @@ -42,11 +42,11 @@ public: struct TimerResultsData { std::clock_t _clocks; - long _numberOfResults; + long mNumberOfResults; TimerResultsData() : _clocks(0) - , _numberOfResults(0) { + , mNumberOfResults(0) { } double seconds() const {