Commit fc057683 authored by Max Kellermann's avatar Max Kellermann

Queue: add method ModifyAtPosition()

parent 03b57df6
...@@ -82,7 +82,7 @@ queue::ModifyAtOrder(unsigned _order) ...@@ -82,7 +82,7 @@ queue::ModifyAtOrder(unsigned _order)
assert(_order < length); assert(_order < length);
unsigned position = order[_order]; unsigned position = order[_order];
items[position].version = version; ModifyAtPosition(position);
} }
void void
......
...@@ -245,6 +245,17 @@ struct queue { ...@@ -245,6 +245,17 @@ struct queue {
* IncrementVersion() after all modifications have been made. * IncrementVersion() after all modifications have been made.
* number. * number.
*/ */
void ModifyAtPosition(unsigned position) {
assert(position < length);
items[position].version = version;
}
/**
* Marks the specified song as "modified". Call
* IncrementVersion() after all modifications have been made.
* number.
*/
void ModifyAtOrder(unsigned order); void ModifyAtOrder(unsigned order);
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment