Commit 5af1d924 authored by Marius Pa's avatar Marius Pa
Browse files

speed QLinkedList is deprecated

Fix warning "warning: ‘template<class T> class QLinkedList’ is
deprecated: Use std::list instead [-Wdeprecated-declarations]".
parent 2d158991
Pipeline #251109 passed with stage
in 2 minutes and 33 seconds
......@@ -40,12 +40,8 @@ void Speed::update(bt::TimeStamp now)
bytes -= p.first; // subtract bytes
else
bytes = 0;
#ifndef DO_NOT_USE_DEQUE
dlrate.pop_front();
i = dlrate.begin();
#else
i = dlrate.erase(i);
#endif
} else {
// seeing that newer entries are appended, they are in the list chronologically
// so once we hit an entry which is in the interval, we can just break out of the loop
......
......@@ -22,11 +22,8 @@ class Speed
{
QAtomicInt rate;
bt::Uint32 bytes;
#ifndef DO_NOT_USE_DEQUE
std::deque<QPair<bt::Uint32, bt::TimeStamp>> dlrate;
#else
QLinkedList<QPair<bt::Uint32, bt::TimeStamp>> dlrate;
#endif
public:
Speed();
virtual ~Speed();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment