diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-02-13 17:23:31 +0000 |
---|---|---|
committer | Tim Flynn <trflynn89@pm.me> | 2023-02-15 12:48:26 -0500 |
commit | d6075ef5b52fcf281270c192f01aa59d821a6528 (patch) | |
tree | 51db5903bd06bd465a6255755c5b2257a2dd5569 /Userland/Libraries/LibGfx/Font | |
parent | 3c8bfa46626594c126f2835090e84ac5bb51167b (diff) | |
download | serenity-d6075ef5b52fcf281270c192f01aa59d821a6528.zip |
LibTextCodec+Everywhere: Make TextCodec::decoder_for() take a StringView
We don't need a full String/DeprecatedString inside this function, so we
might as well not force users to create one.
Diffstat (limited to 'Userland/Libraries/LibGfx/Font')
-rw-r--r-- | Userland/Libraries/LibGfx/Font/OpenType/Font.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp b/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp index 2c8ae189ef..3a983ee213 100644 --- a/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp +++ b/Userland/Libraries/LibGfx/Font/OpenType/Font.cpp @@ -321,7 +321,7 @@ DeprecatedString Name::string_for_id(NameId id) const auto const offset = name_record.string_offset; if (platform_id == to_underlying(Platform::Windows)) { - static auto& decoder = *TextCodec::decoder_for("utf-16be"); + static auto& decoder = *TextCodec::decoder_for("utf-16be"sv); return decoder.to_utf8(StringView { (char const*)m_slice.offset_pointer(storage_offset + offset), length }); } |