Skip to content

Commit 089df02

Browse files
zZoMROTPetarKirov
authored andcommitted
Remove unused code
1 parent 3f5e47c commit 089df02

2 files changed

Lines changed: 0 additions & 7 deletions

File tree

Speed.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ void Speed::update(const unsigned int numPoints, const unsigned int indexDevice)
4343
}
4444
}
4545

46-
double Speed::getSpeed() const {
47-
return this->getSpeed(m_lSamples);
48-
}
49-
5046
double Speed::getSpeed(const unsigned int indexDevice) const {
5147
return m_mDeviceSamples.count(indexDevice) == 0 ? 0 : this->getSpeed(m_mDeviceSamples.at(indexDevice));
5248
}
@@ -69,7 +65,6 @@ void Speed::updateList(const unsigned int & numPoints, const long long & ns, sam
6965
l.push_back(samplePair(ns, numPoints));
7066

7167
// Pop old samples until time difference between first and last element is less than or equal to m_sampleSeconds
72-
// We don't need to check size of m_lSamples since it's always >= 1 at this point
7368
while (l.size() > 2 && (l.back().first - l.front().first) / 1000000 > m_intervalSampleMs) {
7469
l.pop_front();
7570
}

Speed.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class Speed {
1818
void update(const unsigned int numPoints, const unsigned int indexDevice);
1919
void print() const;
2020

21-
double getSpeed() const;
2221
double getSpeed(const unsigned int indexDevice) const;
2322

2423
private:
@@ -31,7 +30,6 @@ class Speed {
3130

3231
long long m_lastPrint;
3332
mutable std::recursive_mutex m_mutex;
34-
sampleList m_lSamples;
3533
std::map<unsigned int, sampleList> m_mDeviceSamples;
3634
};
3735

0 commit comments

Comments
 (0)