diff --git a/Userland/Utilities/js.cpp b/Userland/Utilities/js.cpp index a72f30c1edd..baa0c05928b 100644 --- a/Userland/Utilities/js.cpp +++ b/Userland/Utilities/js.cpp @@ -268,7 +268,7 @@ static void print_separator(bool& first) first = false; } -static void print_array(JS::Array& array, HashTable& seen_objects) +static void print_array(JS::Array const& array, HashTable& seen_objects) { js_out("["); bool first = true; @@ -288,7 +288,7 @@ static void print_array(JS::Array& array, HashTable& seen_objects) js_out("]"); } -static void print_object(JS::Object& object, HashTable& seen_objects) +static void print_object(JS::Object const& object, HashTable& seen_objects) { js_out("{{"); bool first = true; @@ -388,7 +388,7 @@ static void print_map(JS::Map const& map, HashTable& seen_objects) print_type("Map"); js_out(" {{"); bool first = true; - for (auto& entry : map) { + for (auto const& entry : map) { print_separator(first); print_value(entry.key, seen_objects); js_out(" => "); @@ -404,7 +404,7 @@ static void print_set(JS::Set const& set, HashTable& seen_objects) print_type("Set"); js_out(" {{"); bool first = true; - for (auto& entry : set) { + for (auto const& entry : set) { print_separator(first); 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& seen_objects) +static void print_intl_relative_time_format(JS::Intl::RelativeTimeFormat const& date_time_format, HashTable& seen_objects) { print_type("Intl.RelativeTimeFormat"); js_out("\n locale: ");