SongFilter: pass std::string&& to Item constructor

This commit is contained in:
Max Kellermann 2018-07-24 22:09:29 +02:00
parent a54f9ede2e
commit a2b24cb5a2
2 changed files with 3 additions and 4 deletions

View File

@ -60,9 +60,9 @@ locate_parse_type(const char *str) noexcept
return tag_name_parse_i(str);
}
SongFilter::Item::Item(unsigned _tag, const char *_value, bool _fold_case)
SongFilter::Item::Item(unsigned _tag, std::string &&_value, bool _fold_case)
:tag(_tag),
value(_value),
value(std::move(_value)),
fold_case(_fold_case ? IcuCompare(value.c_str()) : IcuCompare())
{
}

View File

@ -67,8 +67,7 @@ public:
std::chrono::system_clock::time_point time;
public:
gcc_nonnull(3)
Item(unsigned tag, const char *value, bool fold_case=false);
Item(unsigned tag, std::string &&_value, bool fold_case=false);
Item(unsigned tag, std::chrono::system_clock::time_point time);
unsigned GetTag() const {