From 322b0616322760dc162447563d8f4da7e024ca90 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 7 Jan 2014 21:39:47 +0100 Subject: DetachedSong: fork of struct Song From now on, struct Song will be used by the database only, and DetachedSong will be used by everybody else. DetachedSong is easier to use, but Song has lower overhead. --- src/DatabaseQueue.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/DatabaseQueue.cxx') diff --git a/src/DatabaseQueue.cxx b/src/DatabaseQueue.cxx index b093ce073..3dac54630 100644 --- a/src/DatabaseQueue.cxx +++ b/src/DatabaseQueue.cxx @@ -23,14 +23,16 @@ #include "DatabasePlugin.hxx" #include "Partition.hxx" #include "util/Error.hxx" +#include "DetachedSong.hxx" #include static bool -AddToQueue(Partition &partition, Song &song, Error &error) +AddToQueue(Partition &partition, const Song &song, Error &error) { PlaylistResult result = - partition.playlist.AppendSong(partition.pc, &song, nullptr); + partition.playlist.AppendSong(partition.pc, DetachedSong(song), + nullptr); if (result != PlaylistResult::SUCCESS) { error.Set(playlist_domain, int(result), "Playlist error"); return false; -- cgit v1.2.3