mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 20:15:17 +00:00
LibJS: Use StringBuilder::join()
This commit is contained in:
parent
4eef3e5a09
commit
5db8940c9e
Notes:
sideshowbarker
2024-07-19 08:13:03 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/5db8940c9e6
1 changed files with 1 additions and 9 deletions
|
@ -393,16 +393,8 @@ void NullLiteral::dump(int indent) const
|
|||
|
||||
void FunctionNode::dump(int indent, const char* class_name) const
|
||||
{
|
||||
bool first_time = true;
|
||||
StringBuilder parameters_builder;
|
||||
for (const auto& parameter : parameters()) {
|
||||
if (first_time)
|
||||
first_time = false;
|
||||
else
|
||||
parameters_builder.append(',');
|
||||
|
||||
parameters_builder.append(parameter);
|
||||
}
|
||||
parameters_builder.join(',', parameters());
|
||||
|
||||
print_indent(indent);
|
||||
printf("%s '%s(%s)'\n", class_name, name().characters(), parameters_builder.build().characters());
|
||||
|
|
Loading…
Add table
Reference in a new issue