LibIDL: Avoid unnecessary HashMap copy

This commit is contained in:
Ben Wiederhake 2023-05-13 21:09:12 +02:00 committed by Jelle Raaijmakers
parent 31ba0a1a4c
commit 688d8febe4
Notes: sideshowbarker 2024-07-17 03:59:29 +09:00

View File

@ -312,7 +312,7 @@ Vector<Parameter> Parser::parse_parameters()
bool variadic = lexer.consume_specific("..."sv);
consume_whitespace();
auto name = lexer.consume_until([](auto ch) { return is_ascii_space(ch) || ch == ',' || ch == ')' || ch == '='; });
Parameter parameter = { move(type), move(name), optional, {}, extended_attributes, variadic };
Parameter parameter = { move(type), move(name), optional, {}, move(extended_attributes), variadic };
consume_whitespace();
if (variadic) {
// Variadic parameters must be last and do not have default values.