queue/Queue: add methods MoveOrderBefore() and MoveOrderAfter()

This commit is contained in:
Max Kellermann
2017-10-18 08:50:01 +02:00
parent 81b7373637
commit f2fac77d8c
2 changed files with 36 additions and 0 deletions

View File

@@ -289,6 +289,24 @@ struct Queue {
*/
unsigned MoveOrder(unsigned from_order, unsigned to_order) noexcept;
/**
* Moves a song to a new position in the "order" list before
* the given one.
*
* @return the new order number of the given "from" song
*/
unsigned MoveOrderBefore(unsigned from_order,
unsigned to_order) noexcept;
/**
* Moves a song to a new position in the "order" list after
* the given one.
*
* @return the new order number of the given "from" song
*/
unsigned MoveOrderAfter(unsigned from_order,
unsigned to_order) noexcept;
/**
* Moves a song to a new position.
*/