1
0
Fork 0
mirror of https://github.com/LadybirdBrowser/ladybird.git synced 2025-06-11 18:20:43 +09:00

LibTextCodec: Simplify Latin1Decoder::process() a tiny bit

This commit is contained in:
Nico Weber 2023-01-24 08:50:38 -05:00 committed by Linus Groh
parent 850b4a03e6
commit b14b5a4d06
Notes: sideshowbarker 2024-07-17 01:20:07 +09:00

View file

@ -339,8 +339,7 @@ DeprecatedString UTF16LEDecoder::to_utf8(StringView input)
void Latin1Decoder::process(StringView input, Function<void(u32)> on_code_point)
{
for (size_t i = 0; i < input.length(); ++i) {
u8 ch = input[i];
for (auto ch : input) {
// Latin1 is the same as the first 256 Unicode code_points, so no mapping is needed, just utf-8 encoding.
on_code_point(ch);
}