1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-28 08:25:07 +00:00

LibGfx/PortableFormat: Make read_whitespace return an ErrorOr

This commit is contained in:
Lucas CHOLLET 2023-03-12 16:05:12 -04:00 committed by Andreas Kling
parent 74f893e9f4
commit bab2113ec1
3 changed files with 23 additions and 19 deletions

View file

@ -39,7 +39,7 @@ bool read_image_data(PGMLoadingContext& context, Streamer& streamer)
break;
auto value = number_or_error.value();
if (!read_whitespace(context, streamer))
if (read_whitespace(context, streamer).is_error())
break;
color_data.append({ (u8)value, (u8)value, (u8)value });