mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:47:35 +00:00
LibGfx/PNM: Remove two fixmes
bab2113ec1
made read_whitespace() return ErrorOr, which makes this easy to do. (7cafd7d177
, which added the fixmes, landed slightly afterbab2113ec1
, so not quite sure why it wasn't like this immediately. Maybe commit order got changed during review; both commits were in #17831.) No behavior change.
This commit is contained in:
parent
eeb0d6f52b
commit
e269526020
1 changed files with 2 additions and 2 deletions
|
@ -116,12 +116,12 @@ static ErrorOr<void> read_whitespace(TContext& context)
|
||||||
auto const byte = byte_or_error.value();
|
auto const byte = byte_or_error.value();
|
||||||
|
|
||||||
if (byte == '#') {
|
if (byte == '#') {
|
||||||
stream.seek(-1, SeekMode::FromCurrentPosition).release_value_but_fixme_should_propagate_errors();
|
TRY(stream.seek(-1, SeekMode::FromCurrentPosition));
|
||||||
TRY(read_comment(context));
|
TRY(read_comment(context));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (byte != ' ' && byte != '\t' && byte != '\n' && byte != '\r') {
|
if (byte != ' ' && byte != '\t' && byte != '\n' && byte != '\r') {
|
||||||
stream.seek(-1, SeekMode::FromCurrentPosition).release_value_but_fixme_should_propagate_errors();
|
TRY(stream.seek(-1, SeekMode::FromCurrentPosition));
|
||||||
if (is_first_char)
|
if (is_first_char)
|
||||||
return Error::from_string_literal("Can't read whitespace from stream");
|
return Error::from_string_literal("Can't read whitespace from stream");
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue