summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4aa3b9)
raw | patch | inline | side by side (parent: f4aa3b9)
author | Max Kellermann <max@duempel.org> | |
Sun, 18 Oct 2009 00:00:01 +0000 (02:00 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Sun, 18 Oct 2009 00:00:01 +0000 (02:00 +0200) |
In ncmpc, nobody reads the song's "position" attribute (except for the
"plchanges" handler). We don't need it, and we don't need to update
it after a swap.
"plchanges" handler). We don't need it, and we don't need to update
it after a swap.
src/playlist.h | patch | blob | history |
diff --git a/src/playlist.h b/src/playlist.h
index 6f54736b1f22e6256e8cbabc2eebceeea1d39647..45046880869d3c545f42158c767c8dd32b3f8ad9 100644 (file)
--- a/src/playlist.h
+++ b/src/playlist.h
{
struct mpd_song *song1 = playlist_get(playlist, idx1);
struct mpd_song *song2 = playlist_get(playlist, idx2);
- int n;
-
- /* update the songs position field */
- n = mpd_song_get_pos(song1);
- mpd_song_set_pos(song1, mpd_song_get_pos(song2));
- mpd_song_set_pos(song2, n);
/* update the array */
g_ptr_array_index(playlist->list, idx1) = song2;