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
Notes: sideshowbarker 2024-07-17 18:46:57 +09:00
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 });