LibWeb: Skip dynamic_cast in CSSRGB after we already did a type check

This commit is contained in:
Andreas Kling 2025-04-18 10:33:19 +02:00 committed by Andreas Kling
parent d8188c9f14
commit 57809b1100
Notes: github-actions[bot] 2025-04-18 12:47:04 +00:00

View file

@ -67,7 +67,7 @@ bool CSSRGB::equals(CSSStyleValue const& other) const
auto const& other_color = other.as_color();
if (color_type() != other_color.color_type())
return false;
auto const& other_rgb = as<CSSRGB>(other_color);
auto const& other_rgb = static_cast<CSSRGB const&>(other_color);
return m_properties == other_rgb.m_properties;
}