mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 05:39:11 +00:00
LibWeb: Add non-const version of paintable_box() in Layout::Node
Allows to remove a bunch of const_cast's
This commit is contained in:
parent
dc08e9138c
commit
6868ace8f4
Notes:
sideshowbarker
2024-07-17 03:59:29 +09:00
Author: https://github.com/kalenikaliaksandr
Commit: 6868ace8f4
Pull-request: https://github.com/SerenityOS/serenity/pull/20395
Reviewed-by: https://github.com/MacDue
3 changed files with 11 additions and 5 deletions
|
@ -77,6 +77,11 @@ JS::GCPtr<Painting::Paintable> Box::create_paintable() const
|
|||
return Painting::PaintableBox::create(*this);
|
||||
}
|
||||
|
||||
Painting::PaintableBox* Box::paintable_box()
|
||||
{
|
||||
return static_cast<Painting::PaintableBox*>(Node::paintable());
|
||||
}
|
||||
|
||||
Painting::PaintableBox const* Box::paintable_box() const
|
||||
{
|
||||
return static_cast<Painting::PaintableBox const*>(Node::paintable());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue