aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/Queue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-27 19:15:01 +0100
committerMax Kellermann <max@duempel.org>2014-02-27 20:49:13 +0100
commitf65254680a8521631ecdd722ff522f574da20d8f (patch)
treec23b73ae978cf5ca4aa51d81eb3fe19747f77726 /src/db/update/Queue.hxx
parentd64edb68966ebba3b15a5c3c5fb863db73f1aec3 (diff)
downloadmpd-f65254680a8521631ecdd722ff522f574da20d8f.tar.gz
mpd-f65254680a8521631ecdd722ff522f574da20d8f.tar.xz
mpd-f65254680a8521631ecdd722ff522f574da20d8f.zip
db/update/Queue: use std::list instead of std::queue
The problem with std::queue is that it doesn't give us enough control. The method Clear() is a kludge already, but soon, we'll need filtering.
Diffstat (limited to '')
-rw-r--r--src/db/update/Queue.hxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/db/update/Queue.hxx b/src/db/update/Queue.hxx
index eb0b268bf..039c62fe3 100644
--- a/src/db/update/Queue.hxx
+++ b/src/db/update/Queue.hxx
@@ -23,7 +23,6 @@
#include "check.h"
#include <string>
-#include <queue>
#include <list>
struct UpdateQueueItem {
@@ -44,7 +43,7 @@ struct UpdateQueueItem {
class UpdateQueue {
static constexpr unsigned MAX_UPDATE_QUEUE_SIZE = 32;
- std::queue<UpdateQueueItem, std::list<UpdateQueueItem>> update_queue;
+ std::list<UpdateQueueItem> update_queue;
public:
bool Push(const char *path, bool discard, unsigned id);
@@ -52,7 +51,7 @@ public:
UpdateQueueItem Pop();
void Clear() {
- update_queue = decltype(update_queue)();
+ update_queue.clear();
}
};