Everywhere: Change west consts caught by clang-format-21 to east consts

This commit is contained in:
Luke Wilde 2025-08-29 13:02:52 +01:00 committed by Tim Ledbetter
parent 829437c11d
commit b17783bb10
Notes: github-actions[bot] 2025-08-29 17:20:11 +00:00
49 changed files with 80 additions and 80 deletions

View file

@ -260,7 +260,7 @@ void HTMLParser::run(HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point
flush_character_insertions();
}
void HTMLParser::run(const URL::URL& url, HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point)
void HTMLParser::run(URL::URL const& url, HTMLTokenizer::StopAtInsertionPoint stop_at_insertion_point)
{
m_document->set_url(url);
m_document->set_source(m_tokenizer.source());

View file

@ -66,7 +66,7 @@ public:
static GC::Ref<HTMLParser> create(DOM::Document&, StringView input, StringView encoding);
void run(HTMLTokenizer::StopAtInsertionPoint = HTMLTokenizer::StopAtInsertionPoint::No);
void run(const URL::URL&, HTMLTokenizer::StopAtInsertionPoint = HTMLTokenizer::StopAtInsertionPoint::No);
void run(URL::URL const&, HTMLTokenizer::StopAtInsertionPoint = HTMLTokenizer::StopAtInsertionPoint::No);
static void the_end(GC::Ref<DOM::Document>, GC::Ptr<HTMLParser> = nullptr);

View file

@ -28,7 +28,7 @@ void ListOfActiveFormattingElements::add_marker()
m_entries.append({ nullptr });
}
bool ListOfActiveFormattingElements::contains(const DOM::Element& element) const
bool ListOfActiveFormattingElements::contains(DOM::Element const& element) const
{
for (auto& entry : m_entries) {
if (entry.element.ptr() == &element)

View file

@ -23,7 +23,7 @@ public:
};
bool is_empty() const { return m_entries.is_empty(); }
bool contains(const DOM::Element&) const;
bool contains(DOM::Element const&) const;
void add(DOM::Element& element);
void add_marker();

View file

@ -36,7 +36,7 @@ bool StackOfOpenElements::has_in_scope(FlyString const& tag_name) const
return has_in_scope_impl(tag_name, s_base_list);
}
bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const& list) const
bool StackOfOpenElements::has_in_scope_impl(DOM::Element const& target_node, Vector<FlyString> const& list) const
{
for (auto& element : m_elements.in_reverse()) {
if (element.ptr() == &target_node)
@ -47,7 +47,7 @@ bool StackOfOpenElements::has_in_scope_impl(const DOM::Element& target_node, Vec
VERIFY_NOT_REACHED();
}
bool StackOfOpenElements::has_in_scope(const DOM::Element& target_node) const
bool StackOfOpenElements::has_in_scope(DOM::Element const& target_node) const
{
return has_in_scope_impl(target_node, s_base_list);
}
@ -97,7 +97,7 @@ bool StackOfOpenElements::has_in_select_scope(FlyString const& tag_name) const
VERIFY_NOT_REACHED();
}
bool StackOfOpenElements::contains(const DOM::Element& element) const
bool StackOfOpenElements::contains(DOM::Element const& element) const
{
for (auto& element_on_stack : m_elements) {
if (&element == element_on_stack.ptr())

View file

@ -32,7 +32,7 @@ public:
void replace(DOM::Element const& to_remove, GC::Ref<DOM::Element> to_add);
void insert_immediately_below(GC::Ref<DOM::Element> element_to_add, DOM::Element const& target);
const DOM::Element& current_node() const { return *m_elements.last(); }
DOM::Element const& current_node() const { return *m_elements.last(); }
DOM::Element& current_node() { return *m_elements.last(); }
bool has_in_scope(FlyString const& tag_name) const;
@ -41,9 +41,9 @@ public:
bool has_in_list_item_scope(FlyString const& tag_name) const;
bool has_in_select_scope(FlyString const& tag_name) const;
bool has_in_scope(const DOM::Element&) const;
bool has_in_scope(DOM::Element const&) const;
bool contains(const DOM::Element&) const;
bool contains(DOM::Element const&) const;
[[nodiscard]] bool contains_template_element() const;
auto const& elements() const { return m_elements; }
@ -64,7 +64,7 @@ public:
private:
bool has_in_scope_impl(FlyString const& tag_name, Vector<FlyString> const&) const;
bool has_in_scope_impl(const DOM::Element& target_node, Vector<FlyString> const&) const;
bool has_in_scope_impl(DOM::Element const& target_node, Vector<FlyString> const&) const;
Vector<GC::Ref<DOM::Element>> m_elements;
};