diff options
author | Max Kellermann <max@duempel.org> | 2014-11-25 19:00:06 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-11-26 08:50:58 +0100 |
commit | 7519768cb1a9ed27012111d30cc69238616aba04 (patch) | |
tree | 650c7edb769033bb26e776683b38ce812eb97da8 /src/queue/Queue.cxx | |
parent | 9af470c92dd7dab57740fff266e5fd49f437572d (diff) | |
download | mpd-7519768cb1a9ed27012111d30cc69238616aba04.tar.gz mpd-7519768cb1a9ed27012111d30cc69238616aba04.tar.xz mpd-7519768cb1a9ed27012111d30cc69238616aba04.zip |
Queue: add "reorder" parameter to SetPriority()
Diffstat (limited to 'src/queue/Queue.cxx')
-rw-r--r-- | src/queue/Queue.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/queue/Queue.cxx b/src/queue/Queue.cxx index 99b545ab1..039af096e 100644 --- a/src/queue/Queue.cxx +++ b/src/queue/Queue.cxx @@ -402,7 +402,8 @@ Queue::CountSamePriority(unsigned start_order, uint8_t priority) const } bool -Queue::SetPriority(unsigned position, uint8_t priority, int after_order) +Queue::SetPriority(unsigned position, uint8_t priority, int after_order, + bool reorder) { assert(position < length); @@ -414,7 +415,7 @@ Queue::SetPriority(unsigned position, uint8_t priority, int after_order) item->version = version; item->priority = priority; - if (!random) + if (!random || !reorder) /* don't reorder if not in random mode */ return true; |