song/Filter: pass std::string_view to WithoutBasePrefix()

This commit is contained in:
Max Kellermann 2020-04-02 19:36:22 +02:00
parent 66bcf04cbd
commit 02294a8236
2 changed files with 3 additions and 3 deletions

View File

@ -467,9 +467,8 @@ SongFilter::GetBase() const noexcept
}
SongFilter
SongFilter::WithoutBasePrefix(const char *_prefix) const noexcept
SongFilter::WithoutBasePrefix(const std::string_view prefix) const noexcept
{
const StringView prefix(_prefix);
SongFilter result;
for (const auto &i : and_filter.GetItems()) {

View File

@ -25,6 +25,7 @@
#include <cstdint>
#include <string>
#include <string_view>
/**
* Special value for the db_selection_print() sort parameter.
@ -105,7 +106,7 @@ public:
* from all #LOCATE_TAG_BASE_TYPE items. This is used to
* filter songs in mounted databases.
*/
SongFilter WithoutBasePrefix(const char *prefix) const noexcept;
SongFilter WithoutBasePrefix(std::string_view prefix) const noexcept;
};
#endif