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:
Dan Klishch 2024-04-18 15:32:56 -04:00 committed by Tim Flynn
commit 5ed7cd6e32
Notes: sideshowbarker 2024-07-16 23:38:54 +09:00
175 changed files with 353 additions and 353 deletions

View file

@ -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);
};

View file

@ -1315,7 +1315,7 @@ void Renderer::show_empty_image(Gfx::IntSize size)
m_painter.stroke_path(rect_path(image_border), Color::Black, 1);
}
static ErrorOr<NonnullRefPtr<Gfx::Bitmap>> apply_alpha_channel(NonnullRefPtr<Gfx::Bitmap> image_bitmap, NonnullRefPtr<const Gfx::Bitmap> mask_bitmap, bool invert_alpha = false)
static ErrorOr<NonnullRefPtr<Gfx::Bitmap>> apply_alpha_channel(NonnullRefPtr<Gfx::Bitmap> image_bitmap, NonnullRefPtr<Gfx::Bitmap const> mask_bitmap, bool invert_alpha = false)
{
// Make alpha mask same size as image.
if (mask_bitmap->size() != image_bitmap->size()) {