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:
Max Kellermann
2014-01-07 21:39:47 +01:00
parent 43847f2244
commit 322b061632
70 changed files with 811 additions and 779 deletions
-10
View File
@@ -31,8 +31,6 @@
std::string
sticker_song_get_value(const Song &song, const char *name)
{
assert(song.IsInDatabase());
const auto uri = song.GetURI();
return sticker_load_value("song", uri.c_str(), name);
}
@@ -41,8 +39,6 @@ bool
sticker_song_set_value(const Song &song,
const char *name, const char *value)
{
assert(song.IsInDatabase());
const auto uri = song.GetURI();
return sticker_store_value("song", uri.c_str(), name, value);
}
@@ -50,8 +46,6 @@ sticker_song_set_value(const Song &song,
bool
sticker_song_delete(const Song &song)
{
assert(song.IsInDatabase());
const auto uri = song.GetURI();
return sticker_delete("song", uri.c_str());
}
@@ -59,8 +53,6 @@ sticker_song_delete(const Song &song)
bool
sticker_song_delete_value(const Song &song, const char *name)
{
assert(song.IsInDatabase());
const auto uri = song.GetURI();
return sticker_delete_value("song", uri.c_str(), name);
}
@@ -68,8 +60,6 @@ sticker_song_delete_value(const Song &song, const char *name)
struct sticker *
sticker_song_get(const Song &song)
{
assert(song.IsInDatabase());
const auto uri = song.GetURI();
return sticker_load("song", uri.c_str());
}