LibWeb: Use static_cast in SVGGeometryBox::dom_node()

These are only ever constructed with a corresponding SVGGeometryElement,
so we know it's safe to static_cast here.
This commit is contained in:
Andreas Kling 2023-03-10 21:15:15 +01:00
parent ab4cf7c57d
commit f6426cdcd4
Notes: sideshowbarker 2024-07-17 02:22:23 +09:00

View file

@ -18,8 +18,8 @@ public:
SVGGeometryBox(DOM::Document&, SVG::SVGGeometryElement&, NonnullRefPtr<CSS::StyleProperties>);
virtual ~SVGGeometryBox() override = default;
SVG::SVGGeometryElement& dom_node() { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); }
SVG::SVGGeometryElement const& dom_node() const { return verify_cast<SVG::SVGGeometryElement>(SVGGraphicsBox::dom_node()); }
SVG::SVGGeometryElement& dom_node() { return static_cast<SVG::SVGGeometryElement&>(SVGGraphicsBox::dom_node()); }
SVG::SVGGeometryElement const& dom_node() const { return static_cast<SVG::SVGGeometryElement const&>(SVGGraphicsBox::dom_node()); }
float viewbox_scaling() const;
CSSPixelPoint viewbox_origin() const;