mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-18 09:02:53 +00:00
LibGfx/PortableFormat: Make read_whitespace
return an ErrorOr
This commit is contained in:
parent
74f893e9f4
commit
bab2113ec1
Notes:
sideshowbarker
2024-07-17 18:46:57 +09:00
Author: https://github.com/LucasChollet
Commit: bab2113ec1
Pull-request: https://github.com/SerenityOS/serenity/pull/17831
Reviewed-by: https://github.com/kleinesfilmroellchen ✅
Reviewed-by: https://github.com/nico
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