playlist: Give PlaylistQueues a clear() function
This is used to clear the queue before populating it with a different playlist. Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
This commit is contained in:
parent
5026e80eab
commit
d0fb9b2155
|
@ -17,13 +17,17 @@ public:
|
||||||
set_flag(Q_NO_SORT);
|
set_flag(Q_NO_SORT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void clear()
|
||||||
|
{
|
||||||
|
while (size() > 0)
|
||||||
|
del((unsigned)0);
|
||||||
|
}
|
||||||
|
|
||||||
void fill(IndexEntry *ent)
|
void fill(IndexEntry *ent)
|
||||||
{
|
{
|
||||||
std::set<unsigned int>::iterator it;
|
std::set<unsigned int>::iterator it;
|
||||||
|
|
||||||
while (size() > 0)
|
clear();
|
||||||
del((unsigned)0);
|
|
||||||
|
|
||||||
for (it = ent->begin(); it != ent->end(); it++)
|
for (it = ent->begin(); it != ent->end(); it++)
|
||||||
add(tags :: get_track(*it));
|
add(tags :: get_track(*it));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue