mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +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
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue