diff options
Diffstat (limited to 'src/QueuePrint.cxx')
-rw-r--r-- | src/QueuePrint.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/QueuePrint.cxx b/src/QueuePrint.cxx index d8d94d3b0..d5651cde0 100644 --- a/src/QueuePrint.cxx +++ b/src/QueuePrint.cxx @@ -38,70 +38,70 @@ extern "C" { * @param end the index of the last song (excluding) */ static void -queue_print_song_info(Client *client, const struct queue *queue, +queue_print_song_info(Client &client, const queue &queue, unsigned position) { - song_print_info(client, queue->Get(position)); + song_print_info(client, queue.Get(position)); client_printf(client, "Pos: %u\nId: %u\n", - position, queue->PositionToId(position)); + position, queue.PositionToId(position)); - uint8_t priority = queue->GetPriorityAtPosition(position); + uint8_t priority = queue.GetPriorityAtPosition(position); if (priority != 0) client_printf(client, "Prio: %u\n", priority); } void -queue_print_info(Client *client, const struct queue *queue, +queue_print_info(Client &client, const queue &queue, unsigned start, unsigned end) { assert(start <= end); - assert(end <= queue->GetLength()); + assert(end <= queue.GetLength()); for (unsigned i = start; i < end; ++i) queue_print_song_info(client, queue, i); } void -queue_print_uris(Client *client, const struct queue *queue, +queue_print_uris(Client &client, const queue &queue, unsigned start, unsigned end) { assert(start <= end); - assert(end <= queue->GetLength()); + assert(end <= queue.GetLength()); for (unsigned i = start; i < end; ++i) { client_printf(client, "%i:", i); - song_print_uri(client, queue->Get(i)); + song_print_uri(client, queue.Get(i)); } } void -queue_print_changes_info(Client *client, const struct queue *queue, +queue_print_changes_info(Client &client, const queue &queue, uint32_t version) { - for (unsigned i = 0; i < queue->GetLength(); i++) { - if (queue->IsNewerAtPosition(i, version)) + for (unsigned i = 0; i < queue.GetLength(); i++) { + if (queue.IsNewerAtPosition(i, version)) queue_print_song_info(client, queue, i); } } void -queue_print_changes_position(Client *client, const struct queue *queue, +queue_print_changes_position(Client &client, const queue &queue, uint32_t version) { - for (unsigned i = 0; i < queue->GetLength(); i++) - if (queue->IsNewerAtPosition(i, version)) + for (unsigned i = 0; i < queue.GetLength(); i++) + if (queue.IsNewerAtPosition(i, version)) client_printf(client, "cpos: %i\nId: %i\n", - i, queue->PositionToId(i)); + i, queue.PositionToId(i)); } void -queue_find(Client *client, const struct queue *queue, +queue_find(Client &client, const queue &queue, const SongFilter &filter) { - for (unsigned i = 0; i < queue->GetLength(); i++) { - const Song *song = queue->Get(i); + for (unsigned i = 0; i < queue.GetLength(); i++) { + const Song &song = queue.Get(i); - if (filter.Match(*song)) + if (filter.Match(song)) queue_print_song_info(client, queue, i); } } |