AK: Ignore possible const reference when comparing type equality in is

This commit is contained in:
Tim Ledbetter 2025-08-22 15:35:27 +01:00 committed by Jelle Raaijmakers
commit d31aec25e8
Notes: github-actions[bot] 2025-08-22 18:27:19 +00:00
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ namespace AK {
template<typename OutputType, typename InputType>
ALWAYS_INLINE bool is(InputType& input)
{
static_assert(!SameAs<OutputType, InputType>);
static_assert(!SameAs<RemoveCVReference<OutputType>, RemoveCVReference<InputType>>);
if constexpr (requires { input.template fast_is<OutputType>(); }) {
return input.template fast_is<OutputType>();
}

View file

@ -3686,7 +3686,7 @@ Optional<Element::Directionality> Element::contained_text_auto_directionality(bo
// - an element whose dir attribute is not in the undefined state
// then continue.
// NOTE: "any ancestor element of descendant that is a descendant of element" will be iterated already.
auto is_one_of_the_filtered_elements = [](auto& descendant) -> bool {
auto is_one_of_the_filtered_elements = [](DOM::Node const& descendant) -> bool {
return is<HTML::HTMLScriptElement>(descendant)
|| is<HTML::HTMLStyleElement>(descendant)
|| is<HTML::HTMLTextAreaElement>(descendant)