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.
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
|
||||
#include "config.h"
|
||||
#include "Partition.hxx"
|
||||
#include "Song.hxx"
|
||||
#include "DetachedSong.hxx"
|
||||
|
||||
void
|
||||
Partition::DatabaseModified()
|
||||
@@ -30,10 +30,10 @@ Partition::DatabaseModified()
|
||||
void
|
||||
Partition::TagModified()
|
||||
{
|
||||
Song *song = pc.LockReadTaggedSong();
|
||||
DetachedSong *song = pc.LockReadTaggedSong();
|
||||
if (song != nullptr) {
|
||||
playlist.TagModified(std::move(*song));
|
||||
song->Free();
|
||||
delete song;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user