diff options
author | Max Kellermann <max@duempel.org> | 2013-01-06 21:33:58 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-06 21:33:58 +0100 |
commit | 108242042e684b9d6147aeb97351b823e0a1ed0b (patch) | |
tree | 76f6fdc7854cd127f6b5899aed45968f7a777154 /src/QueueSave.cxx | |
parent | 70652abf9750b62d2b4e5857d894494ae6058cf1 (diff) | |
download | mpd-108242042e684b9d6147aeb97351b823e0a1ed0b.tar.gz mpd-108242042e684b9d6147aeb97351b823e0a1ed0b.tar.xz mpd-108242042e684b9d6147aeb97351b823e0a1ed0b.zip |
queue: convert all functions to methods
Diffstat (limited to 'src/QueueSave.cxx')
-rw-r--r-- | src/QueueSave.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/QueueSave.cxx b/src/QueueSave.cxx index a667bc855..09b0645f8 100644 --- a/src/QueueSave.cxx +++ b/src/QueueSave.cxx @@ -61,19 +61,19 @@ queue_save_song(FILE *fp, int idx, const struct song *song) void queue_save(FILE *fp, const struct queue *queue) { - for (unsigned i = 0; i < queue_length(queue); i++) { - uint8_t prio = queue_get_priority_at_position(queue, i); + for (unsigned i = 0; i < queue->GetLength(); i++) { + uint8_t prio = queue->GetPriorityAtPosition(i); if (prio != 0) fprintf(fp, PRIO_LABEL "%u\n", prio); - queue_save_song(fp, i, queue_get(queue, i)); + queue_save_song(fp, i, queue->Get(i)); } } void queue_load_song(TextFile &file, const char *line, queue *queue) { - if (queue_is_full(queue)) + if (queue->IsFull()) return; uint8_t priority = 0; @@ -123,7 +123,7 @@ queue_load_song(TextFile &file, const char *line, queue *queue) } } - queue_append(queue, song, priority); + queue->Append(song, priority); if (db != nullptr) db->ReturnSong(song); |