1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:57:35 +00:00

Revert "Userland: static vs non-static constexpr variables"

This reverts commit 800ea8ea96.

Booting the system no longer worked after these changes.
This commit is contained in:
Linus Groh 2021-05-21 10:30:21 +01:00
parent 68f76b9e37
commit d60ebbbba6
38 changed files with 184 additions and 192 deletions

View file

@ -19,6 +19,10 @@
namespace Gfx {
// Row strides and offsets for each interlace pass.
static const int INTERLACE_ROW_STRIDES[] = { 8, 8, 4, 2 };
static const int INTERLACE_ROW_OFFSETS[] = { 0, 4, 2, 1 };
struct ImageDescriptor {
u16 x { 0 };
u16 y { 0 };
@ -108,8 +112,8 @@ enum class GIFFormat {
static Optional<GIFFormat> decode_gif_header(InputMemoryStream& stream)
{
constexpr char valid_header_87[] = "GIF87a";
constexpr char valid_header_89[] = "GIF89a";
static const char valid_header_87[] = "GIF87a";
static const char valid_header_89[] = "GIF89a";
Array<u8, 6> header;
stream >> header;
@ -374,8 +378,6 @@ static bool decode_frame(GIFLoadingContext& context, size_t frame_index)
if (pixel_index % image.width == 0) {
if (image.interlaced) {
if (interlace_pass < 4) {
constexpr Array INTERLACE_ROW_STRIDES = { 8, 8, 4, 2 };
constexpr Array INTERLACE_ROW_OFFSETS = { 0, 4, 2, 1 };
if (row + INTERLACE_ROW_STRIDES[interlace_pass] >= image.height) {
++interlace_pass;
if (interlace_pass < 4)