mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:28:12 +00:00
LibJS+LibWeb: Return non-const types from Ptr class operators
Even if the pointer value is const, the value they point to is not necessarily const, so these functions should not add the qualifier. This also removes the redundant non-const implementations of these operators.
This commit is contained in:
parent
3483407ddc
commit
66a428ae03
3 changed files with 15 additions and 46 deletions
|
@ -121,7 +121,7 @@ WebIDL::ExceptionOr<void> CanvasRenderingContext2D::draw_image_internal(CanvasIm
|
|||
if (usability == CanvasImageSourceUsability::Bad)
|
||||
return {};
|
||||
|
||||
auto const* bitmap = image.visit([](auto const& source) { return source->bitmap(); });
|
||||
auto const* bitmap = image.visit([](auto const& source) -> Gfx::Bitmap const* { return source->bitmap(); });
|
||||
if (!bitmap)
|
||||
return {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue