util/AllocatedString: add string_view constructor

Replaces the static Duplicate() method.
This commit is contained in:
Max Kellermann
2021-01-14 13:16:52 +01:00
committed by Max Kellermann
parent 32b7b2e2fa
commit 6e1c8edf09
5 changed files with 18 additions and 14 deletions

View File

@@ -46,7 +46,7 @@ IcuCompare::IcuCompare(std::string_view _needle) noexcept
#else
IcuCompare::IcuCompare(std::string_view _needle) noexcept
:needle(AllocatedString::Duplicate(_needle)) {}
:needle(_needle) {}
#endif