mirror of
https://github.com/zeek/zeek.git
synced 2025-10-04 23:58:20 +00:00
Use single-character version of string find() (performance-faster-string-find)
This commit is contained in:
parent
95d2af4501
commit
c32566420a
8 changed files with 10 additions and 10 deletions
|
@ -48,7 +48,7 @@ void Manager::SearchDynamicPlugins(const std::string& dir)
|
|||
if ( dir.empty() )
|
||||
return;
|
||||
|
||||
if ( dir.find(":") != string::npos )
|
||||
if ( dir.find(':') != string::npos )
|
||||
{
|
||||
// Split at ":".
|
||||
std::stringstream s(dir);
|
||||
|
@ -492,7 +492,7 @@ Plugin* Manager::LookupPluginByPath(std::string_view _path)
|
|||
if ( i != plugins_by_path.end() )
|
||||
return i->second;
|
||||
|
||||
auto j = path.rfind("/");
|
||||
auto j = path.rfind('/');
|
||||
|
||||
if ( j == std::string::npos )
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue