From 90fe4c5124e3fd335f05804d3cc47ba996e62b14 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 3 Jan 2013 10:16:05 +0100 Subject: TextFile: convert to a class --- src/SongSave.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/SongSave.cxx') diff --git a/src/SongSave.cxx b/src/SongSave.cxx index cbc2536b1..a32b7fecc 100644 --- a/src/SongSave.cxx +++ b/src/SongSave.cxx @@ -63,8 +63,8 @@ song_save(FILE *fp, const struct song *song) } struct song * -song_load(FILE *fp, Directory *parent, const char *uri, - GString *buffer, GError **error_r) +song_load(TextFile &file, Directory *parent, const char *uri, + GError **error_r) { struct song *song = parent != NULL ? song_file_new(uri, parent) @@ -73,7 +73,7 @@ song_load(FILE *fp, Directory *parent, const char *uri, enum tag_type type; const char *value; - while ((line = read_text_line(fp, buffer)) != NULL && + while ((line = file.ReadLine()) != NULL && strcmp(line, SONG_END) != 0) { colon = strchr(line, ':'); if (colon == NULL || colon == line) { -- cgit v1.2.3