summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorLucas CHOLLET <lucas.chollet@free.fr>2023-03-21 18:01:03 -0400
committerLinus Groh <mail@linusgroh.de>2023-04-03 17:12:27 +0100
commit261d36351d988cd7c2eaaaff21144b51fbc3ae84 (patch)
treee48291d2b83a4e64135ecd0ffaa4590f42dfb32b /Userland
parentdf12e705419160f1f0fd9b78073bfadde2ee297c (diff)
downloadserenity-261d36351d988cd7c2eaaaff21144b51fbc3ae84.zip
LibGfx/JPEG: Replace C-style array by `Array`
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp
index 94e737010c..85afc901d8 100644
--- a/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp
+++ b/Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp
@@ -247,7 +247,7 @@ struct JPEGLoadingContext {
u16 dc_restart_interval { 0 };
HashMap<u8, HuffmanTableSpec> dc_tables;
HashMap<u8, HuffmanTableSpec> ac_tables;
- i32 previous_dc_values[3] = { 0 };
+ Array<i32, 3> previous_dc_values {};
MacroblockMeta mblock_meta;
OwnPtr<FixedMemoryStream> stream;
@@ -579,9 +579,7 @@ static void reset_decoder(JPEGLoadingContext& context)
// E.2.4 Control procedure for decoding a restart interval
if (is_dct_based(context.frame.type)) {
- context.previous_dc_values[0] = 0;
- context.previous_dc_values[1] = 0;
- context.previous_dc_values[2] = 0;
+ context.previous_dc_values = {};
return;
}