decoder/DecoderPlugin: container_scan() returns forward_list<DetachedSong>

Speed up container_scan() again, by eliminating the need to call
scan_file() for each item.
This commit is contained in:
Max Kellermann
2016-11-22 12:25:52 +01:00
parent 72c96052b4
commit 95e2bec215
6 changed files with 47 additions and 35 deletions

View File

@@ -19,6 +19,8 @@
#include "config.h"
#include "Log.hxx"
#include "DetachedSong.hxx"
#include "SongSave.hxx"
#include "decoder/DecoderList.hxx"
#include "decoder/DecoderPlugin.hxx"
#include "fs/Path.hxx"
@@ -84,7 +86,7 @@ try {
BufferedOutputStream bos(sos);
for (const auto &song : v)
bos.Format("%s\n", song.c_str());
song_save(bos, song);
bos.Flush();