1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:57:43 +00:00

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -159,11 +159,11 @@ Optional<String> GzipDecompressor::describe_header(ReadonlyBytes bytes)
if (bytes.size() < sizeof(BlockHeader))
return {};
auto& header = *(reinterpret_cast<const BlockHeader*>(bytes.data()));
auto& header = *(reinterpret_cast<BlockHeader const*>(bytes.data()));
if (!header.valid_magic_number() || !header.supported_by_implementation())
return {};
LittleEndian<u32> original_size = *reinterpret_cast<const u32*>(bytes.offset(bytes.size() - sizeof(u32)));
LittleEndian<u32> original_size = *reinterpret_cast<u32 const*>(bytes.offset(bytes.size() - sizeof(u32)));
return String::formatted("last modified: {}, original size {}", Core::DateTime::from_timestamp(header.modification_time).to_string(), (u32)original_size);
}
@ -202,7 +202,7 @@ Optional<ByteBuffer> GzipDecompressor::decompress_all(ReadonlyBytes bytes)
u8 buffer[4096];
while (!gzip_stream.has_any_error() && !gzip_stream.unreliable_eof()) {
const auto nread = gzip_stream.read({ buffer, sizeof(buffer) });
auto const nread = gzip_stream.read({ buffer, sizeof(buffer) });
output_stream.write_or_error({ buffer, nread });
}