Simpify std/png "yield short read" loop

This commit is contained in:
Nigel Tao committed 2022-01-25 14:29:18 +11:00
1 parent 63d8564b3c
commit a4b14a0f17
2 files changed
+2 -4

No files matched your search

+1 -2
View File
@@ -40554,9 +40554,8 @@ wuffs_png__decoder__decode_frame(
wuffs_png__decoder__filter_and_swizzle(self, a_dst, wuffs_base__slice_u8__subslice_j(a_workbuf, self->private_impl.f_workbuf_wi));
}
while (true) {
status = v_status;
status = wuffs_base__make_status(wuffs_base__suspension__short_read);
WUFFS_BASE__COROUTINE_SUSPENSION_POINT_MAYBE_SUSPEND(6);
v_status = wuffs_base__make_status(wuffs_base__suspension__short_read);
}
}
status = v_status;
+1 -2
View File
@@ -1209,8 +1209,7 @@ pub func decoder.decode_frame?(dst: ptr base.pixel_buffer, src: base.io_reader,
this.filter_and_swizzle!(dst: args.dst, workbuf: args.workbuf[.. this.workbuf_wi])
}
while true {
yield? status
status = base."$short read"
yield? base."$short read"
} endwhile
}
yield? status