Commit 02294a82 authored by Max Kellermann's avatar Max Kellermann

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

parent 66bcf04c
...@@ -467,9 +467,8 @@ SongFilter::GetBase() const noexcept ...@@ -467,9 +467,8 @@ SongFilter::GetBase() const noexcept
} }
SongFilter SongFilter
SongFilter::WithoutBasePrefix(const char *_prefix) const noexcept SongFilter::WithoutBasePrefix(const std::string_view prefix) const noexcept
{ {
const StringView prefix(_prefix);
SongFilter result; SongFilter result;
for (const auto &i : and_filter.GetItems()) { for (const auto &i : and_filter.GetItems()) {
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <cstdint> #include <cstdint>
#include <string> #include <string>
#include <string_view>
/** /**
* Special value for the db_selection_print() sort parameter. * Special value for the db_selection_print() sort parameter.
...@@ -105,7 +106,7 @@ public: ...@@ -105,7 +106,7 @@ public:
* from all #LOCATE_TAG_BASE_TYPE items. This is used to * from all #LOCATE_TAG_BASE_TYPE items. This is used to
* filter songs in mounted databases. * filter songs in mounted databases.
*/ */
SongFilter WithoutBasePrefix(const char *prefix) const noexcept; SongFilter WithoutBasePrefix(std::string_view prefix) const noexcept;
}; };
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment