1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 20:28:11 +00: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

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);
}