diff options
author | Max Kellermann <max@duempel.org> | 2013-01-02 22:04:03 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-02 22:16:05 +0100 |
commit | 8331de424a67b137cd83ce817da0fceec647dc2f (patch) | |
tree | b5243fbff385d9732c683cb1efc64eec85f3189f /src/PlaylistDatabase.cxx | |
parent | 98dbdf72b3c35878494df4954a447cec250a835d (diff) |
PlaylistInfo: rename class, use std::string
Diffstat (limited to 'src/PlaylistDatabase.cxx')
-rw-r--r-- | src/PlaylistDatabase.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/PlaylistDatabase.cxx b/src/PlaylistDatabase.cxx index a2062a517..bbfdf7481 100644 --- a/src/PlaylistDatabase.cxx +++ b/src/PlaylistDatabase.cxx @@ -38,20 +38,19 @@ playlist_database_quark(void) void playlist_vector_save(FILE *fp, const struct list_head *pv) { - struct playlist_metadata *pm; + PlaylistInfo *pm; playlist_vector_for_each(pm, pv) fprintf(fp, PLAYLIST_META_BEGIN "%s\n" "mtime: %li\n" "playlist_end\n", - pm->name, (long)pm->mtime); + pm->name.c_str(), (long)pm->mtime); } bool playlist_metadata_load(FILE *fp, struct list_head *pv, const char *name, GString *buffer, GError **error_r) { - struct playlist_metadata pm; - pm.mtime = 0; + PlaylistInfo pm(name, 0); char *line, *colon; const char *value; @@ -77,6 +76,6 @@ playlist_metadata_load(FILE *fp, struct list_head *pv, const char *name, } } - playlist_vector_update_or_add(pv, name, pm.mtime); + playlist_vector_update_or_add(pv, std::move(pm)); return true; } |