aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-22 00:38:10 +0200
committerMax Kellermann <max@duempel.org>2013-10-22 00:59:56 +0200
commit03b57df6308a7f84e0e597c3687e7adfc512c630 (patch)
treed4ed185101cf0a507c2dbe2e5b5f91b513ad50e6 /src
parent4de3b6dc801fdb0d30809348a13565652a9938c1 (diff)
downloadmpd-03b57df6308a7f84e0e597c3687e7adfc512c630.tar.gz
mpd-03b57df6308a7f84e0e597c3687e7adfc512c630.tar.xz
mpd-03b57df6308a7f84e0e597c3687e7adfc512c630.zip
Queue: ModifyAtOrder() does not increment version
Leave that to the caller, allowing it to modify multiple items at a time.
Diffstat (limited to 'src')
-rw-r--r--src/Playlist.cxx1
-rw-r--r--src/Queue.cxx2
-rw-r--r--src/Queue.hxx3
3 files changed, 3 insertions, 3 deletions
diff --git a/src/Playlist.cxx b/src/Playlist.cxx
index 296b52769..2f01d6be9 100644
--- a/src/Playlist.cxx
+++ b/src/Playlist.cxx
@@ -48,6 +48,7 @@ playlist::TagModified(Song &&song)
current_song.ReplaceTag(std::move(*song.tag));
queue.ModifyAtOrder(current);
+ queue.IncrementVersion();
idle_add(IDLE_PLAYLIST);
}
diff --git a/src/Queue.cxx b/src/Queue.cxx
index 73628d02e..ea93e8157 100644
--- a/src/Queue.cxx
+++ b/src/Queue.cxx
@@ -83,8 +83,6 @@ queue::ModifyAtOrder(unsigned _order)
unsigned position = order[_order];
items[position].version = version;
-
- IncrementVersion();
}
void
diff --git a/src/Queue.hxx b/src/Queue.hxx
index 0088e080f..e3a66f3a8 100644
--- a/src/Queue.hxx
+++ b/src/Queue.hxx
@@ -241,7 +241,8 @@ struct queue {
void IncrementVersion();
/**
- * Marks the specified song as "modified" and increments the version
+ * Marks the specified song as "modified". Call
+ * IncrementVersion() after all modifications have been made.
* number.
*/
void ModifyAtOrder(unsigned order);