aboutsummaryrefslogtreecommitdiff
path: root/src/Queue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-08 16:05:10 +0100
committerMax Kellermann <max@duempel.org>2013-01-08 16:05:10 +0100
commite29bc6912b263251675c16b7689c3919ffe51f5a (patch)
treefb3c7f60d72b96b7f2041aa9069ccd7bbb4b55cc /src/Queue.hxx
parentce57b8b6dfaae1655e4bdccd6ae600237cc50b38 (diff)
Queue: rename internal types
Diffstat (limited to 'src/Queue.hxx')
-rw-r--r--src/Queue.hxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Queue.hxx b/src/Queue.hxx
index 9e1bde3a..a453ddcf 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)];