Use single-character version of string find() (performance-faster-string-find)

This commit is contained in:
Tim Wojtulewicz 2020-02-03 11:19:37 -05:00
parent 95d2af4501
commit c32566420a
8 changed files with 10 additions and 10 deletions

View file

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