mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 15:38:10 +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
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