mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
gen-zam: Reserve space for args vector before pushing back items
This commit is contained in:
parent
75bba1a8f5
commit
97492b4d70
1 changed files with 1 additions and 0 deletions
|
@ -2284,6 +2284,7 @@ void ZAM_InternalOpTemplate::ParseCall(const string& line, const Words& words)
|
|||
}
|
||||
|
||||
eval += "auto n = aux->n;\n";
|
||||
eval += "args.reserve(n);\n";
|
||||
eval += "for ( auto i = 0; i < n; ++i )\n";
|
||||
eval += "\targs.push_back(aux->ToVal(frame, i));\n";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue