mirror of
https://github.com/RGBCube/serenity
synced 2025-06-30 18:42:13 +00:00
LibTextCodec+Everywhere: Return Optional<Decoder&> from decoder_for()
This commit is contained in:
parent
2f4c463920
commit
f2a9426885
16 changed files with 42 additions and 39 deletions
|
@ -2798,8 +2798,8 @@ HTMLTokenizer::HTMLTokenizer()
|
|||
|
||||
HTMLTokenizer::HTMLTokenizer(StringView input, DeprecatedString const& encoding)
|
||||
{
|
||||
auto* decoder = TextCodec::decoder_for(encoding);
|
||||
VERIFY(decoder);
|
||||
auto decoder = TextCodec::decoder_for(encoding);
|
||||
VERIFY(decoder.has_value());
|
||||
m_decoded_input = decoder->to_utf8(input);
|
||||
m_utf8_view = Utf8View(m_decoded_input);
|
||||
m_utf8_iterator = m_utf8_view.begin();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue