diff options
author | Lucas CHOLLET <lucas.chollet@free.fr> | 2023-03-21 18:01:03 -0400 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-04-03 17:12:27 +0100 |
commit | 261d36351d988cd7c2eaaaff21144b51fbc3ae84 (patch) | |
tree | e48291d2b83a4e64135ecd0ffaa4590f42dfb32b /Userland | |
parent | df12e705419160f1f0fd9b78073bfadde2ee297c (diff) | |
download | serenity-261d36351d988cd7c2eaaaff21144b51fbc3ae84.zip |
LibGfx/JPEG: Replace C-style array by `Array`
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp | 6 |
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; } |