mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibTextCodec: Don't allocate Strings on encoding normalisation
This ripples down to LibWeb's HTML and XHR decoders, which therefore become less allocation heavy.
This commit is contained in:
parent
820e03e8d4
commit
6a95df2526
Notes:
sideshowbarker
2024-07-17 17:00:47 +09:00
Author: https://github.com/Hendiadyoin1
Commit: 6a95df2526
Pull-request: https://github.com/SerenityOS/serenity/pull/13168
6 changed files with 48 additions and 48 deletions
|
@ -80,7 +80,7 @@ public:
|
|||
};
|
||||
|
||||
Decoder* decoder_for(String const& encoding);
|
||||
Optional<String> get_standardized_encoding(const String& encoding);
|
||||
Optional<StringView> get_standardized_encoding(StringView encoding);
|
||||
|
||||
// This returns the appropriate Unicode decoder for the sniffed BOM or nullptr if there is no appropriate decoder.
|
||||
Decoder* bom_sniff_to_decoder(StringView);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue