diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Directory.cxx | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/Directory.cxx b/src/Directory.cxx index 210d7cb67..b230ac642 100644 --- a/src/Directory.cxx +++ b/src/Directory.cxx @@ -252,20 +252,6 @@ Directory::Sort() child->Sort(); } -static LightSong -ExportSong(const Song &src) -{ - LightSong dest; - dest.directory = src.parent->IsRoot() - ? nullptr : src.parent->GetPath(); - dest.uri = src.uri; - dest.tag = &src.tag; - dest.mtime = src.mtime; - dest.start_ms = src.start_ms; - dest.end_ms = src.end_ms; - return dest; -} - bool Directory::Walk(bool recursive, const SongFilter *filter, VisitDirectory visit_directory, VisitSong visit_song, @@ -277,7 +263,7 @@ Directory::Walk(bool recursive, const SongFilter *filter, if (visit_song) { Song *song; directory_for_each_song(song, *this) { - const LightSong song2 = ExportSong(*song); + const LightSong song2 = song->Export(); if ((filter == nullptr || filter->Match(song2)) && !visit_song(song2, error)) return false; |