queue/Queue: add method GetLight()
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "Queue.hxx"
|
||||
#include "song/DetachedSong.hxx"
|
||||
#include "song/LightSong.hxx"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
@@ -38,6 +39,15 @@ Queue::~Queue() noexcept
|
||||
delete[] order;
|
||||
}
|
||||
|
||||
LightSong
|
||||
Queue::GetLight(unsigned position) const noexcept
|
||||
{
|
||||
assert(position < length);
|
||||
|
||||
LightSong song{Get(position)};
|
||||
return song;
|
||||
}
|
||||
|
||||
int
|
||||
Queue::GetNextOrder(unsigned _order) const noexcept
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user