mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:47:35 +00:00
AK: Remove the fallible constructor from FixedMemoryStream
This commit is contained in:
parent
8b2f23d016
commit
220fbcaa7e
31 changed files with 185 additions and 209 deletions
|
@ -1202,7 +1202,7 @@ static ErrorOr<void> scan_huffman_stream(AK::SeekableStream& stream, JPGLoadingC
|
|||
static ErrorOr<void> decode_header(JPGLoadingContext& context)
|
||||
{
|
||||
if (context.state < JPGLoadingContext::State::HeaderDecoded) {
|
||||
context.stream = TRY(FixedMemoryStream::construct({ context.data, context.data_size }));
|
||||
context.stream = TRY(try_make<FixedMemoryStream>(ReadonlyBytes { context.data, context.data_size }));
|
||||
|
||||
if (auto result = parse_header(*context.stream, context); result.is_error()) {
|
||||
context.state = JPGLoadingContext::State::Error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue