diff options
author | Nico Weber <thakis@chromium.org> | 2023-01-24 08:50:38 -0500 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-01-24 14:37:20 +0000 |
commit | b14b5a4d06d58d0270a4714d427617932474ec52 (patch) | |
tree | f0b1443724b6fdae7cdc6d89f2b26b923fb8790e /Userland/Libraries/LibTextCodec | |
parent | 850b4a03e6e5c0478c3c63559abddd8f714b6ac4 (diff) | |
download | serenity-b14b5a4d06d58d0270a4714d427617932474ec52.zip |
LibTextCodec: Simplify Latin1Decoder::process() a tiny bit
Diffstat (limited to 'Userland/Libraries/LibTextCodec')
-rw-r--r-- | Userland/Libraries/LibTextCodec/Decoder.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Userland/Libraries/LibTextCodec/Decoder.cpp b/Userland/Libraries/LibTextCodec/Decoder.cpp index 1bb32a28a7..4c6b2fbfb7 100644 --- a/Userland/Libraries/LibTextCodec/Decoder.cpp +++ b/Userland/Libraries/LibTextCodec/Decoder.cpp @@ -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); } |