From d6075ef5b52fcf281270c192f01aa59d821a6528 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 13 Feb 2023 17:23:31 +0000 Subject: 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. --- Userland/Utilities/js.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Userland/Utilities') 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 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); -- cgit v1.2.3