aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-19 15:36:42 +0200
committerMax Kellermann <max@duempel.org>2013-10-19 15:36:47 +0200
commit90777f78c99774023e694bef5933da88d74f4d45 (patch)
tree668969327b74812d8219126c53bc378ad0496a13 /src/playlist
parent7cb803ad5c2ba3678198ff954e4a8c8f565a4668 (diff)
downloadmpd-90777f78c99774023e694bef5933da88d74f4d45.tar.gz
mpd-90777f78c99774023e694bef5933da88d74f4d45.tar.xz
mpd-90777f78c99774023e694bef5933da88d74f4d45.zip
playlist/(Ext)M3u: use strchug_fast()
Diffstat (limited to 'src/playlist')
-rw-r--r--src/playlist/ExtM3uPlaylistPlugin.cxx3
-rw-r--r--src/playlist/M3uPlaylistPlugin.cxx7
2 files changed, 3 insertions, 7 deletions
diff --git a/src/playlist/ExtM3uPlaylistPlugin.cxx b/src/playlist/ExtM3uPlaylistPlugin.cxx
index c6f6e5bf7..9d164185a 100644
--- a/src/playlist/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/ExtM3uPlaylistPlugin.cxx
@@ -125,8 +125,7 @@ ExtM3uPlaylist::NextSong()
continue;
}
- while (*line_s != 0 && g_ascii_isspace(*line_s))
- ++line_s;
+ line_s = strchug_fast(line_s);
} while (line_s[0] == '#' || *line_s == 0);
song = Song::NewRemote(line_s);
diff --git a/src/playlist/M3uPlaylistPlugin.cxx b/src/playlist/M3uPlaylistPlugin.cxx
index 8854be8d7..c0b63ca2d 100644
--- a/src/playlist/M3uPlaylistPlugin.cxx
+++ b/src/playlist/M3uPlaylistPlugin.cxx
@@ -22,10 +22,9 @@
#include "PlaylistPlugin.hxx"
#include "SongEnumerator.hxx"
#include "Song.hxx"
+#include "util/StringUtil.hxx"
#include "TextInputStream.hxx"
-#include <glib.h>
-
class M3uPlaylist final : public SongEnumerator {
TextInputStream tis;
@@ -54,9 +53,7 @@ M3uPlaylist::NextSong()
return NULL;
line_s = line.c_str();
-
- while (*line_s != 0 && g_ascii_isspace(*line_s))
- ++line_s;
+ line_s = strchug_fast(line_s);
} while (line_s[0] == '#' || *line_s == 0);
return Song::NewRemote(line_s);