diff options
author | Max Kellermann <max@musicpd.org> | 2020-04-02 19:46:19 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2020-04-02 19:49:39 +0200 |
commit | 6197b29aa0a165129f553c00c78af564fd624e21 (patch) | |
tree | 65738ddf1ba0a5b72a884d7a5851c9cdcb01253f /src/db/PlaylistVector.cxx | |
parent | 02294a82361aeded7bd684eb55d65c57be1b11b2 (diff) |
db/PlaylistInfo: pass std::string_view to CompareName
Diffstat (limited to 'src/db/PlaylistVector.cxx')
-rw-r--r-- | src/db/PlaylistVector.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/db/PlaylistVector.cxx b/src/db/PlaylistVector.cxx index 9197a004d..9c2697741 100644 --- a/src/db/PlaylistVector.cxx +++ b/src/db/PlaylistVector.cxx @@ -24,10 +24,9 @@ #include <cassert> PlaylistVector::iterator -PlaylistVector::find(const char *name) noexcept +PlaylistVector::find(std::string_view name) noexcept { assert(holding_db_lock()); - assert(name != nullptr); return std::find_if(begin(), end(), PlaylistInfo::CompareName(name)); @@ -51,7 +50,7 @@ PlaylistVector::UpdateOrInsert(PlaylistInfo &&pi) noexcept } bool -PlaylistVector::erase(const char *name) noexcept +PlaylistVector::erase(std::string_view name) noexcept { assert(holding_db_lock()); |