aboutsummaryrefslogtreecommitdiffstats
path: root/src/db/update/Queue.cxx
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.cxx
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 'src/db/update/Queue.cxx')
-rw-r--r--src/db/update/Queue.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/db/update/Queue.cxx b/src/db/update/Queue.cxx
index 4bb0ae725..096a39a8c 100644
--- a/src/db/update/Queue.cxx
+++ b/src/db/update/Queue.cxx
@@ -26,7 +26,7 @@ UpdateQueue::Push(const char *path, bool discard, unsigned id)
if (update_queue.size() >= MAX_UPDATE_QUEUE_SIZE)
return false;
- update_queue.emplace(path, discard, id);
+ update_queue.emplace_back(path, discard, id);
return true;
}
@@ -37,6 +37,6 @@ UpdateQueue::Pop()
return UpdateQueueItem();
auto i = std::move(update_queue.front());
- update_queue.pop();
+ update_queue.pop_front();
return i;
}