Use emplace_back over push_back where appropriate

This commit is contained in:
Tim Wojtulewicz 2023-07-06 15:53:13 -07:00
parent 0d78eb1933
commit 64b78f6fb9
28 changed files with 86 additions and 86 deletions

View file

@ -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;
}