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:
parent
850b4a03e6
commit
b14b5a4d06
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue