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

LibGfx/PortableFormat: Read the header during initialization

This is done as a part of #19893.
This commit is contained in:
Lucas CHOLLET 2023-07-10 16:42:59 -04:00 committed by Sam Atkins
parent f3ff9c26bc
commit 9ff706339b
2 changed files with 4 additions and 14 deletions

View file

@ -195,9 +195,8 @@ static ErrorOr<void> read_header(Context& context)
template<typename TContext>
static ErrorOr<void> decode(TContext& context)
{
VERIFY(context.state == TContext::State::NotDecoded);
VERIFY(context.state == TContext::State::HeaderDecoded);
TRY(read_header(context));
TRY(read_image_data(context));
context.state = TContext::State::BitmapDecoded;