diff options
author | Rosen Penev <rosenp@gmail.com> | 2020-04-30 19:25:55 -0700 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-05-30 13:36:53 +0200 |
commit | e4dad42ca123b9f0f987218c68c42422d6735c0a (patch) | |
tree | 6cf4c3d28e251b285cfe5a30e842edfc3080d6bc /src/PlaylistFile.cxx | |
parent | 99afe8e6d1157c0d443ccbe4b571797cce5b2304 (diff) |
use std chr functions
The ones in std have overloads for const char/char.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/PlaylistFile.cxx')
-rw-r--r-- | src/PlaylistFile.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/PlaylistFile.cxx b/src/PlaylistFile.cxx index aa67a4ae4..bf37c0ef7 100644 --- a/src/PlaylistFile.cxx +++ b/src/PlaylistFile.cxx @@ -43,8 +43,7 @@ #include "util/UriExtract.hxx" #include <cassert> - -#include <string.h> +#include <cstring> static const char PLAYLIST_COMMENT = '#'; @@ -81,9 +80,9 @@ spl_valid_name(const char *name_utf8) * filenames isn't going to happen, either. */ - return strchr(name_utf8, '/') == nullptr && - strchr(name_utf8, '\n') == nullptr && - strchr(name_utf8, '\r') == nullptr; + return std::strchr(name_utf8, '/') == nullptr && + std::strchr(name_utf8, '\n') == nullptr && + std::strchr(name_utf8, '\r') == nullptr; } static const AllocatedPath & |