From 6b8b45c8a34b4acd1f4adb8dc87854d696c4fab4 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Sat, 25 Feb 2023 20:50:22 -0500 Subject: [PATCH] LibGfx/JPEG: Replace magic numbers with their specified name --- Userland/Libraries/LibGfx/JPEGLoader.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibGfx/JPEGLoader.cpp b/Userland/Libraries/LibGfx/JPEGLoader.cpp index c4f7dda69e..c025215db1 100644 --- a/Userland/Libraries/LibGfx/JPEGLoader.cpp +++ b/Userland/Libraries/LibGfx/JPEGLoader.cpp @@ -60,6 +60,8 @@ #define JPEG_RST6 0xFFD6 #define JPEG_RST7 0xFFD7 +#define JPEG_ZRL 0xF0 + #define JPEG_DHP 0xFFDE #define JPEG_EXP 0xFFDF @@ -353,8 +355,8 @@ static ErrorOr add_ac(JPEGLoadingContext& context, Macroblock& macroblock, if (ac_symbol == 0) break; - // ac_symbol = 0xF0 means we need to skip 16 zeroes. - u8 run_length = ac_symbol == 0xF0 ? 16 : ac_symbol >> 4; + // ac_symbol = JPEG_ZRL means we need to skip 16 zeroes. + u8 run_length = ac_symbol == JPEG_ZRL ? 16 : ac_symbol >> 4; j += run_length; if (j > scan.spectral_selection_end) {