diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data.cc | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data.cc b/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data.cc index d311908415..d7c6c2ad78 100644 --- a/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data.cc +++ b/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data.cc @@ -173,8 +173,7 @@ Status ParseChunkedMarker(const jpeg::JPEGData& src, uint8_t marker_type, } Status SetBlobsFromJpegData(const jpeg::JPEGData& jpeg_data, Blobs* blobs) { - for (size_t i = 0; i < jpeg_data.app_data.size(); i++) { - const auto& marker = jpeg_data.app_data[i]; + for (const auto& marker : jpeg_data.app_data) { if (marker.empty() || marker[0] != kApp1) { continue; } @@ -318,11 +317,11 @@ Status EncodeJPEGData(JPEGData& jpeg_data, std::vector<uint8_t>* bytes, } total_data += jpeg_data.app_data[i].size(); } - for (size_t i = 0; i < jpeg_data.com_data.size(); i++) { - total_data += jpeg_data.com_data[i].size(); + for (const auto& data : jpeg_data.com_data) { + total_data += data.size(); } - for (size_t i = 0; i < jpeg_data.inter_marker_data.size(); i++) { - total_data += jpeg_data.inter_marker_data[i].size(); + for (const auto& data : jpeg_data.inter_marker_data) { + total_data += data.size(); } total_data += jpeg_data.tail_data.size(); size_t brotli_capacity = BrotliEncoderMaxCompressedSize(total_data); @@ -365,11 +364,11 @@ Status EncodeJPEGData(JPEGData& jpeg_data, std::vector<uint8_t>* bytes, } br_append(jpeg_data.app_data[i], /*last=*/false); } - for (size_t i = 0; i < jpeg_data.com_data.size(); i++) { - br_append(jpeg_data.com_data[i], /*last=*/false); + for (const auto& data : jpeg_data.com_data) { + br_append(data, /*last=*/false); } - for (size_t i = 0; i < jpeg_data.inter_marker_data.size(); i++) { - br_append(jpeg_data.inter_marker_data[i], /*last=*/false); + for (const auto& data : jpeg_data.inter_marker_data) { + br_append(data, /*last=*/false); } br_append(jpeg_data.tail_data, /*last=*/true); BrotliEncoderDestroyInstance(brotli_enc); |