aboutsummaryrefslogtreecommitdiff
path: root/src/Queue.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Queue.hxx')
-rw-r--r--src/Queue.hxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Queue.hxx b/src/Queue.hxx
index 501fb056..f52dd333 100644
--- a/src/Queue.hxx
+++ b/src/Queue.hxx
@@ -24,6 +24,8 @@
#include <glib.h>
+#include <algorithm>
+
#include <assert.h>
#include <stdint.h>
@@ -265,9 +267,7 @@ struct queue {
* Swaps two songs, addressed by their order number.
*/
void SwapOrders(unsigned order1, unsigned order2) {
- unsigned tmp = order[order1];
- order[order1] = order[order2];
- order[order2] = tmp;
+ std::swap(order[order1], order[order2]);
}
/**