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:
parent
850b4a03e6
commit
b14b5a4d06
Notes:
sideshowbarker
2024-07-17 01:20:07 +09:00
Author: https://github.com/nico
Commit: b14b5a4d06
Pull-request: https://github.com/SerenityOS/serenity/pull/17159
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