aboutsummaryrefslogtreecommitdiffstats
path: root/src/QueueSave.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-03 10:16:05 +0100
committerMax Kellermann <max@duempel.org>2013-01-03 10:16:05 +0100
commit90fe4c5124e3fd335f05804d3cc47ba996e62b14 (patch)
treeef7fb6b3cb2edbe4898431db611f04fb281129fc /src/QueueSave.cxx
parent2452447c814048ed72e95a459c76b4be65962b5c (diff)
downloadmpd-90fe4c5124e3fd335f05804d3cc47ba996e62b14.tar.gz
mpd-90fe4c5124e3fd335f05804d3cc47ba996e62b14.tar.xz
mpd-90fe4c5124e3fd335f05804d3cc47ba996e62b14.zip
TextFile: convert to a class
Diffstat (limited to 'src/QueueSave.cxx')
-rw-r--r--src/QueueSave.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/QueueSave.cxx b/src/QueueSave.cxx
index a468013f4..6ba48f336 100644
--- a/src/QueueSave.cxx
+++ b/src/QueueSave.cxx
@@ -71,8 +71,7 @@ queue_save(FILE *fp, const struct queue *queue)
}
void
-queue_load_song(FILE *fp, GString *buffer, const char *line,
- struct queue *queue)
+queue_load_song(TextFile &file, const char *line, queue *queue)
{
if (queue_is_full(queue))
return;
@@ -81,7 +80,7 @@ queue_load_song(FILE *fp, GString *buffer, const char *line,
if (g_str_has_prefix(line, PRIO_LABEL)) {
priority = strtoul(line + sizeof(PRIO_LABEL) - 1, NULL, 10);
- line = read_text_line(fp, buffer);
+ line = file.ReadLine();
if (line == NULL)
return;
}
@@ -95,7 +94,7 @@ queue_load_song(FILE *fp, GString *buffer, const char *line,
return;
GError *error = NULL;
- song = song_load(fp, NULL, uri, buffer, &error);
+ song = song_load(file, NULL, uri, &error);
if (song == NULL) {
g_warning("%s", error->message);
g_error_free(error);