Skip to content

Commit

Permalink
LibGfx/JPEG: Replace C-style array by Array
Browse files Browse the repository at this point in the history
  • Loading branch information
LucasChollet authored and linusg committed Apr 3, 2023
1 parent df12e70 commit 261d363
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Userland/Libraries/LibGfx/ImageFormats/JPEGLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 261d363

Please sign in to comment.