queue/Queue: MoveOrder() returns to_order
This commit is contained in:
parent
fa67c2548a
commit
81b7373637
@ -310,8 +310,7 @@ playlist::SetRandom(PlayerControl &pc, bool status)
|
|||||||
playlist is played after that */
|
playlist is played after that */
|
||||||
unsigned current_order =
|
unsigned current_order =
|
||||||
queue.PositionToOrder(current_position);
|
queue.PositionToOrder(current_position);
|
||||||
queue.MoveOrder(current_order, 0);
|
current = queue.MoveOrder(current_order, 0);
|
||||||
current = 0;
|
|
||||||
} else
|
} else
|
||||||
current = -1;
|
current = -1;
|
||||||
} else
|
} else
|
||||||
|
@ -195,7 +195,7 @@ Queue::MoveRange(unsigned start, unsigned end, unsigned to) noexcept
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
unsigned
|
||||||
Queue::MoveOrder(unsigned from_order, unsigned to_order) noexcept
|
Queue::MoveOrder(unsigned from_order, unsigned to_order) noexcept
|
||||||
{
|
{
|
||||||
assert(from_order < length);
|
assert(from_order < length);
|
||||||
@ -212,6 +212,7 @@ Queue::MoveOrder(unsigned from_order, unsigned to_order) noexcept
|
|||||||
}
|
}
|
||||||
|
|
||||||
order[to_order] = from_position;
|
order[to_order] = from_position;
|
||||||
|
return to_order;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -284,8 +284,10 @@ struct Queue {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves a song to a new position in the "order" list.
|
* Moves a song to a new position in the "order" list.
|
||||||
|
*
|
||||||
|
* @return to_order
|
||||||
*/
|
*/
|
||||||
void MoveOrder(unsigned from_order, unsigned to_order) noexcept;
|
unsigned MoveOrder(unsigned from_order, unsigned to_order) noexcept;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Moves a song to a new position.
|
* Moves a song to a new position.
|
||||||
|
Loading…
Reference in New Issue
Block a user