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/Utilities | |
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/Utilities')
-rw-r--r-- | Userland/Utilities/js.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index a12af0420d..13ee8ba579 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -877,7 +877,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments) if (Utf8View { file_contents }.validate()) { builder.append(source); } else { - auto* decoder = TextCodec::decoder_for("windows-1252"); + auto* decoder = TextCodec::decoder_for("windows-1252"sv); VERIFY(decoder); auto utf8_source = TextCodec::convert_input_to_utf8_using_given_decoder_unless_there_is_a_byte_order_mark(*decoder, source); |