SongFilter: remove DetachedSong overloads

All DetachedSong instances should be converted to LightSong first,
which is a very cheap operation.
This commit is contained in:
Max Kellermann
2018-07-25 07:43:05 +02:00
parent 96017f58a5
commit 78a65cf281
3 changed files with 6 additions and 37 deletions

View File

@@ -22,6 +22,8 @@
#include "Queue.hxx"
#include "SongFilter.hxx"
#include "SongPrint.hxx"
#include "DetachedSong.hxx"
#include "db/LightSong.hxx"
#include "client/Response.hxx"
/**
@@ -111,7 +113,7 @@ queue_find(Response &r, const Queue &queue,
const SongFilter &filter)
{
for (unsigned i = 0; i < queue.GetLength(); i++) {
const DetachedSong &song = queue.Get(i);
const LightSong song{queue.Get(i)};
if (filter.Match(song))
queue_print_song_info(r, queue, i);