aboutsummaryrefslogtreecommitdiff
path: root/src/Queue.hxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-06 23:44:59 +0100
committerMax Kellermann <max@duempel.org>2013-01-06 23:48:34 +0100
commit6936c0e2abc4e50db169e5c034bd9fb4dab04d0c (patch)
treee2e1d50b6a9fd8c654fd7c6c319344f9fe33320c /src/Queue.hxx
parent108242042e684b9d6147aeb97351b823e0a1ed0b (diff)
Queue: use std::swap
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]);
}
/**