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:
parent
74f893e9f4
commit
bab2113ec1
3 changed files with 23 additions and 19 deletions
|
@ -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 });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue