diff options
author | Max Kellermann <max@duempel.org> | 2014-07-30 20:58:14 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-07-30 22:17:01 +0200 |
commit | 9fb351a139a56fc7b1ece549894f8fc31fa887cd (patch) | |
tree | 7c9ce42a1262af587f1b9fede2b24ff39cef93fc /src/PlaylistDatabase.cxx | |
parent | 0d0ccacdf3e154b1cc27a0840fce80ac13f9641c (diff) |
*Save, *State: use the OutputStream API instead of FILE*
Diffstat (limited to 'src/PlaylistDatabase.cxx')
-rw-r--r-- | src/PlaylistDatabase.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/PlaylistDatabase.cxx b/src/PlaylistDatabase.cxx index 81aeae2cd..336a6d0e0 100644 --- a/src/PlaylistDatabase.cxx +++ b/src/PlaylistDatabase.cxx @@ -21,6 +21,7 @@ #include "PlaylistDatabase.hxx" #include "db/PlaylistVector.hxx" #include "fs/TextFile.hxx" +#include "fs/output/BufferedOutputStream.hxx" #include "util/StringUtil.hxx" #include "util/Error.hxx" #include "util/Domain.hxx" @@ -31,13 +32,13 @@ static constexpr Domain playlist_database_domain("playlist_database"); void -playlist_vector_save(FILE *fp, const PlaylistVector &pv) +playlist_vector_save(BufferedOutputStream &os, const PlaylistVector &pv) { for (const PlaylistInfo &pi : pv) - fprintf(fp, PLAYLIST_META_BEGIN "%s\n" - "mtime: %li\n" - "playlist_end\n", - pi.name.c_str(), (long)pi.mtime); + os.Format(PLAYLIST_META_BEGIN "%s\n" + "mtime: %li\n" + "playlist_end\n", + pi.name.c_str(), (long)pi.mtime); } bool |