mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-07 19:57:45 +03:00
LibIDL: Avoid unnecessary HashMap copy
This commit is contained in:
parent
31ba0a1a4c
commit
688d8febe4
Notes:
sideshowbarker
2024-07-17 03:59:29 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/688d8febe4 Pull-request: https://github.com/SerenityOS/serenity/pull/18821 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/gmta ✅ Reviewed-by: https://github.com/kleinesfilmroellchen ✅
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user