Queue: add constructor and destructor

This commit is contained in:
Max Kellermann
2013-01-06 14:58:54 +01:00
parent e202b407ec
commit 70652abf97
4 changed files with 32 additions and 45 deletions

View File

@@ -50,8 +50,7 @@ main(G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv)
{
struct song songs[16];
struct queue queue;
queue_init(&queue, 32);
struct queue queue(32);
for (unsigned i = 0; i < G_N_ELEMENTS(songs); ++i)
queue_append(&queue, &songs[i], 0);