mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
js: Fix a couple of const correctness issues
This commit is contained in:
parent
098310f425
commit
c87e01dcfd
Notes:
sideshowbarker
2024-07-17 09:47:41 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/c87e01dcfd Pull-request: https://github.com/SerenityOS/serenity/pull/14443 Reviewed-by: https://github.com/IdanHo ✅
@ -268,7 +268,7 @@ static void print_separator(bool& first)
|
|||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_array(JS::Array& array, HashTable<JS::Object*>& seen_objects)
|
static void print_array(JS::Array const& array, HashTable<JS::Object*>& seen_objects)
|
||||||
{
|
{
|
||||||
js_out("[");
|
js_out("[");
|
||||||
bool first = true;
|
bool first = true;
|
||||||
@ -288,7 +288,7 @@ static void print_array(JS::Array& array, HashTable<JS::Object*>& seen_objects)
|
|||||||
js_out("]");
|
js_out("]");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_object(JS::Object& object, HashTable<JS::Object*>& seen_objects)
|
static void print_object(JS::Object const& object, HashTable<JS::Object*>& seen_objects)
|
||||||
{
|
{
|
||||||
js_out("{{");
|
js_out("{{");
|
||||||
bool first = true;
|
bool first = true;
|
||||||
@ -388,7 +388,7 @@ static void print_map(JS::Map const& map, HashTable<JS::Object*>& seen_objects)
|
|||||||
print_type("Map");
|
print_type("Map");
|
||||||
js_out(" {{");
|
js_out(" {{");
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (auto& entry : map) {
|
for (auto const& entry : map) {
|
||||||
print_separator(first);
|
print_separator(first);
|
||||||
print_value(entry.key, seen_objects);
|
print_value(entry.key, seen_objects);
|
||||||
js_out(" => ");
|
js_out(" => ");
|
||||||
@ -404,7 +404,7 @@ static void print_set(JS::Set const& set, HashTable<JS::Object*>& seen_objects)
|
|||||||
print_type("Set");
|
print_type("Set");
|
||||||
js_out(" {{");
|
js_out(" {{");
|
||||||
bool first = true;
|
bool first = true;
|
||||||
for (auto& entry : set) {
|
for (auto const& entry : set) {
|
||||||
print_separator(first);
|
print_separator(first);
|
||||||
print_value(entry.key, seen_objects);
|
print_value(entry.key, seen_objects);
|
||||||
}
|
}
|
||||||
@ -787,7 +787,7 @@ static void print_intl_date_time_format(JS::Intl::DateTimeFormat& date_time_form
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_intl_relative_time_format(JS::Intl::RelativeTimeFormat& date_time_format, HashTable<JS::Object*>& seen_objects)
|
static void print_intl_relative_time_format(JS::Intl::RelativeTimeFormat const& date_time_format, HashTable<JS::Object*>& seen_objects)
|
||||||
{
|
{
|
||||||
print_type("Intl.RelativeTimeFormat");
|
print_type("Intl.RelativeTimeFormat");
|
||||||
js_out("\n locale: ");
|
js_out("\n locale: ");
|
||||||
|
Loading…
Reference in New Issue
Block a user