mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-07 08:39:22 +00:00
Everywhere: Use east const in more places
These changes are compatible with clang-format 16 and will be mandatory when we eventually bump clang-format version. So, since there are no real downsides, let's commit them now.
This commit is contained in:
parent
5ef6df79ed
commit
5ed7cd6e32
Notes:
sideshowbarker
2024-07-16 23:38:54 +09:00
Author: https://github.com/DanShaders
Commit: 5ed7cd6e32
Pull-request: https://github.com/SerenityOS/serenity/pull/24014
175 changed files with 353 additions and 353 deletions
|
@ -464,7 +464,7 @@ PDFErrorOr<NonnullRefPtr<XRefTable>> DocumentParser::parse_xref_stream()
|
|||
|
||||
auto field_to_long = [](ReadonlyBytes field) -> long {
|
||||
long value = 0;
|
||||
const u8 max = (field.size() - 1) * 8;
|
||||
u8 const max = (field.size() - 1) * 8;
|
||||
for (size_t i = 0; i < field.size(); ++i) {
|
||||
value |= static_cast<long>(field[i]) << (max - (i * 8));
|
||||
}
|
||||
|
@ -642,13 +642,13 @@ PDFErrorOr<DocumentParser::PageOffsetHintTable> DocumentParser::parse_page_offse
|
|||
size_t offset = 0;
|
||||
|
||||
auto read_u32 = [&] {
|
||||
u32 data = reinterpret_cast<const u32*>(hint_stream_bytes.data() + offset)[0];
|
||||
u32 data = reinterpret_cast<u32 const*>(hint_stream_bytes.data() + offset)[0];
|
||||
offset += 4;
|
||||
return AK::convert_between_host_and_big_endian(data);
|
||||
};
|
||||
|
||||
auto read_u16 = [&] {
|
||||
u16 data = reinterpret_cast<const u16*>(hint_stream_bytes.data() + offset)[0];
|
||||
u16 data = reinterpret_cast<u16 const*>(hint_stream_bytes.data() + offset)[0];
|
||||
offset += 2;
|
||||
return AK::convert_between_host_and_big_endian(data);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue