LibGfx/JPEGWriter: Make vertical_macroblocks a local

It's only used in one function.

No behavior change.
This commit is contained in:
Nico Weber 2024-01-31 20:53:19 -05:00 committed by Andreas Kling
parent 8964a52fe0
commit ad7d25f089
Notes: sideshowbarker 2024-07-17 06:38:11 +09:00

View file

@ -102,9 +102,8 @@ public:
ErrorOr<void> initialize_mcu(Bitmap const& bitmap)
{
u64 const horizontal_macroblocks = ceil_div(bitmap.width(), 8);
m_vertical_macroblocks = ceil_div(bitmap.height(), 8);
TRY(m_macroblocks.try_resize(horizontal_macroblocks * m_vertical_macroblocks));
u64 const vertical_macroblocks = ceil_div(bitmap.height(), 8);
TRY(m_macroblocks.try_resize(horizontal_macroblocks * vertical_macroblocks));
for (u16 y {}; y < bitmap.height(); ++y) {
u16 const vertical_macroblock_index = y / 8;
@ -339,8 +338,6 @@ private:
Vector<Macroblock> m_macroblocks {};
Array<i16, 3> m_last_dc_values {};
u64 m_vertical_macroblocks {};
JPEGBigEndianOutputBitStream m_bit_stream;
};