aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-08-07 00:06:02 +0200
committerMax Kellermann <max@duempel.org>2014-08-07 00:06:02 +0200
commit69ae879c585039297951821e353f7c1ca12b6cb8 (patch)
treefe394a053d2a45817e934f926be6ee660ba689a8 /src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
parent08fee9a284cc082822392b38574fd2d4b0afb843 (diff)
downloadmpd-69ae879c585039297951821e353f7c1ca12b6cb8.tar.gz
mpd-69ae879c585039297951821e353f7c1ca12b6cb8.tar.xz
mpd-69ae879c585039297951821e353f7c1ca12b6cb8.zip
input/TextInputStream: return char*
Revert to the old API before commit e9e55b08, removing unnecessary bloat.
Diffstat (limited to 'src/playlist/plugins/ExtM3uPlaylistPlugin.cxx')
-rw-r--r--src/playlist/plugins/ExtM3uPlaylistPlugin.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
index 5dd127add..95cc84289 100644
--- a/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
+++ b/src/playlist/plugins/ExtM3uPlaylistPlugin.cxx
@@ -39,9 +39,8 @@ public:
}
bool CheckFirstLine() {
- std::string line;
- return tis.ReadLine(line) &&
- strcmp(line.c_str(), "#EXTM3U") == 0;
+ const char *line = tis.ReadLine();
+ return line != nullptr && strcmp(line, "#EXTM3U") == 0;
}
virtual DetachedSong *NextSong() override;
@@ -105,15 +104,13 @@ DetachedSong *
ExtM3uPlaylist::NextSong()
{
Tag tag;
- std::string line;
const char *line_s;
do {
- if (!tis.ReadLine(line))
+ line_s = tis.ReadLine();
+ if (line_s == nullptr)
return nullptr;
- line_s = line.c_str();
-
if (StringStartsWith(line_s, "#EXTINF:")) {
tag = extm3u_parse_tag(line_s + 8);
continue;