From b2e1b3886452451aa4b11c6eeb44d97f96567b35 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 8 Jan 2014 19:29:47 +0100 Subject: playlist/pls: convert "while" loop to "for" loop --- src/playlist/PlsPlaylistPlugin.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/playlist/PlsPlaylistPlugin.cxx b/src/playlist/PlsPlaylistPlugin.cxx index 6994c8a3d..efd74e9c5 100644 --- a/src/playlist/PlsPlaylistPlugin.cxx +++ b/src/playlist/PlsPlaylistPlugin.cxx @@ -59,7 +59,7 @@ pls_parser(GKeyFile *keyfile, std::forward_list &songs) } } - while (num_entries > 0) { + for (; num_entries > 0; --num_entries) { Song *song; char key[64]; @@ -95,7 +95,6 @@ pls_parser(GKeyFile *keyfile, std::forward_list &songs) song->tag = tag.CommitNew(); songs.emplace_front(song); - num_entries--; } } -- cgit v1.2.3