diff options
author | Matthew Olsson <matthewcolsson@gmail.com> | 2023-02-25 10:44:31 -0700 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2023-03-06 13:05:43 +0000 |
commit | 70a2ca7fc0939dd0d61691c17e108c6169ef6d30 (patch) | |
tree | f798d956bba744bc7c607508be52532e5055096b /Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp | |
parent | 74e93a46eaf9be3c3835682ab2c190c75371ac86 (diff) | |
download | serenity-70a2ca7fc0939dd0d61691c17e108c6169ef6d30.zip |
LibJS: Handle both const and non-const Ts in Handle<T>::create()
Again, the const-ness only really involves Heap-internal metadata, so
the callers shouldn't care about mutations here.
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp index 0e87831a55..78c4301efc 100644 --- a/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp +++ b/Userland/Libraries/LibWeb/HTML/HTMLSelectElement.cpp @@ -84,13 +84,13 @@ Vector<JS::Handle<HTMLOptionElement>> HTMLSelectElement::list_of_options() const // and all the option element children of all the optgroup element children of the select element, in tree order. Vector<JS::Handle<HTMLOptionElement>> list; - for_each_child_of_type<HTMLOptionElement>([&](HTMLOptionElement const& option_element) { - list.append(JS::make_handle(const_cast<HTMLOptionElement&>(option_element))); + for_each_child_of_type<HTMLOptionElement>([&](HTMLOptionElement& option_element) { + list.append(JS::make_handle(option_element)); }); for_each_child_of_type<HTMLOptGroupElement>([&](HTMLOptGroupElement const& optgroup_element) { - optgroup_element.for_each_child_of_type<HTMLOptionElement>([&](HTMLOptionElement const& option_element) { - list.append(JS::make_handle(const_cast<HTMLOptionElement&>(option_element))); + optgroup_element.for_each_child_of_type<HTMLOptionElement>([&](HTMLOptionElement& option_element) { + list.append(JS::make_handle(option_element)); }); }); |