mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
Refactor: Expose const_cast by removing ByteBuffer::warp(const void*, size_t)
This function did a const_cast internally which made the call side look "safe". This method is removed completely and call sites are replaced with ByteBuffer::wrap(const_cast<void*>(data), size) which makes the behaviour obvious.
This commit is contained in:
parent
ac9f6fd1f8
commit
b3d1a05261
15 changed files with 42 additions and 36 deletions
|
@ -1104,7 +1104,7 @@ static bool decode_bmp_pixel_data(BMPLoadingContext& context)
|
|||
return false;
|
||||
}
|
||||
|
||||
auto buffer = ByteBuffer::wrap(context.data + context.data_offset, context.data_size);
|
||||
auto buffer = ByteBuffer::wrap(const_cast<u8*>(context.data + context.data_offset), context.data_size);
|
||||
|
||||
if (context.dib.info.compression == Compression::RLE4 || context.dib.info.compression == Compression::RLE8
|
||||
|| context.dib.info.compression == Compression::RLE24) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue