diff options
author | Max Kellermann <max@duempel.org> | 2013-01-08 16:05:10 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2013-01-08 16:05:10 +0100 |
commit | e29bc6912b263251675c16b7689c3919ffe51f5a (patch) | |
tree | fb3c7f60d72b96b7f2041aa9069ccd7bbb4b55cc /src/Queue.hxx | |
parent | ce57b8b6dfaae1655e4bdccd6ae600237cc50b38 (diff) | |
download | mpd-e29bc6912b263251675c16b7689c3919ffe51f5a.tar.gz mpd-e29bc6912b263251675c16b7689c3919ffe51f5a.tar.xz mpd-e29bc6912b263251675c16b7689c3919ffe51f5a.zip |
Queue: rename internal types
Diffstat (limited to '')
-rw-r--r-- | src/Queue.hxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Queue.hxx b/src/Queue.hxx index 9e1bde3a4..a453ddcf1 100644 --- a/src/Queue.hxx +++ b/src/Queue.hxx @@ -40,16 +40,16 @@ */ struct queue { /** - * reserve max_length * QUEUE_HASH_MULT elements in the id + * reserve max_length * HASH_MULT elements in the id * number space */ - static constexpr unsigned QUEUE_HASH_MULT = 4; + static constexpr unsigned HASH_MULT = 4; /** * One element of the queue: basically a song plus some queue specific * information attached. */ - struct queue_item { + struct Item { struct song *song; /** the unique id of this item in the queue */ @@ -76,7 +76,7 @@ struct queue { uint32_t version; /** all songs in "position" order */ - struct queue_item *items; + Item *items; /** map order numbers to positions */ unsigned *order; @@ -148,7 +148,7 @@ struct queue { } int IdToPosition(unsigned id) const { - if (id >= max_length * QUEUE_HASH_MULT) + if (id >= max_length * HASH_MULT) return -1; assert(id_to_position[id] >= -1); @@ -190,7 +190,7 @@ struct queue { return items[position].priority; } - const queue_item &GetOrderItem(unsigned i) const { + const Item &GetOrderItem(unsigned i) const { assert(IsValidOrder(i)); return items[OrderToPosition(i)]; |