use std chr functions

The ones in std have overloads for const char/char.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-04-30 19:25:55 -07:00
committed by Max Kellermann
parent 99afe8e6d1
commit e4dad42ca1
34 changed files with 71 additions and 77 deletions

View File

@@ -44,7 +44,7 @@ SongPtr
Song::LoadFile(Storage &storage, const char *path_utf8, Directory &parent)
{
assert(!uri_has_scheme(path_utf8));
assert(strchr(path_utf8, '\n') == nullptr);
assert(std::strchr(path_utf8, '\n') == nullptr);
auto song = std::make_unique<Song>(path_utf8, parent);
if (!song->UpdateFile(storage))
@@ -95,7 +95,7 @@ Song::LoadFromArchive(ArchiveFile &archive, const char *name_utf8,
Directory &parent) noexcept
{
assert(!uri_has_scheme(name_utf8));
assert(strchr(name_utf8, '\n') == nullptr);
assert(std::strchr(name_utf8, '\n') == nullptr);
auto song = std::make_unique<Song>(name_utf8, parent);
if (!song->UpdateFileInArchive(archive))