mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Use emplace_back over push_back where appropriate
This commit is contained in:
parent
0d78eb1933
commit
64b78f6fb9
28 changed files with 86 additions and 86 deletions
|
@ -342,7 +342,7 @@ static void parse_function_name(vector<ParseLocationRec>& result, ParseLocationR
|
|||
vector<ParseLocationRec> parse_location_string(const string& s)
|
||||
{
|
||||
vector<ParseLocationRec> result;
|
||||
result.push_back(ParseLocationRec());
|
||||
result.emplace_back();
|
||||
ParseLocationRec& plr = result[0];
|
||||
|
||||
// If PLR_FILE_AND_LINE, set this to the filename you want; for
|
||||
|
@ -531,7 +531,7 @@ void tokenize(const char* cstr, string& operation, vector<string>& arguments)
|
|||
if ( ! num_tokens )
|
||||
operation = string(str, start, len);
|
||||
else
|
||||
arguments.push_back(string(str, start, len));
|
||||
arguments.emplace_back(str, start, len);
|
||||
|
||||
++num_tokens;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue