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

@ -92,7 +92,7 @@ void add_func_analysis_pattern(AnalyOpt& opts, const char* pat)
try
{
std::string full_pat = std::string("^(") + pat + ")$";
opts.only_funcs.emplace_back(std::regex(full_pat));
opts.only_funcs.emplace_back(full_pat);
}
catch ( const std::regex_error& e )
{
@ -105,7 +105,7 @@ void add_file_analysis_pattern(AnalyOpt& opts, const char* pat)
try
{
std::string full_pat = std::string("^.*(") + pat + ").*$";
opts.only_files.emplace_back(std::regex(full_pat));
opts.only_files.emplace_back(full_pat);
}
catch ( const std::regex_error& e )
{