summaryrefslogtreecommitdiff
path: root/library/statistics.cpp
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2014-04-18 17:00:50 +0200
committerDaniel Wilhelm <daniel@wili.li>2014-04-18 17:00:50 +0200
commit4ecfd41e36533d858c98d051ef70cab80e69e972 (patch)
treeca07d8745967d2c6a7123a5d32269cfbfaa7bd6c /library/statistics.cpp
parent2.2 (diff)
downloadFreeFileSync-4ecfd41e36533d858c98d051ef70cab80e69e972.tar.gz
FreeFileSync-4ecfd41e36533d858c98d051ef70cab80e69e972.tar.bz2
FreeFileSync-4ecfd41e36533d858c98d051ef70cab80e69e972.zip
2.3
Diffstat (limited to 'library/statistics.cpp')
-rw-r--r--library/statistics.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/statistics.cpp b/library/statistics.cpp
index f317c114..08bb5dee 100644
--- a/library/statistics.cpp
+++ b/library/statistics.cpp
@@ -124,14 +124,14 @@ void Statistics::addMeasurement(const int objectsCurrent, const double dataCurre
//remove all records earlier than "currentTime - windowSize"
const long newBegin = newEntry.time - windowMax;
- while (measurements.size() > 0 && measurements.front().time < newBegin)
+ while (!measurements.empty() && measurements.front().time < newBegin)
measurements.pop_front();
}
wxString Statistics::getRemainingTime() const
{
- if (measurements.size() > 0)
+ if (!measurements.empty())
{
//find start of records "window"
const record backElement = measurements.back();
@@ -158,7 +158,7 @@ wxString Statistics::getRemainingTime() const
wxString Statistics::getBytesPerSecond() const
{
- if (measurements.size() > 0)
+ if (!measurements.empty())
{
//find start of records "window"
const long frontTime = measurements.back().time - windowSizeBPS;
bgstack15