mirror of
https://github.com/zeek/zeek.git
synced 2025-10-15 21:18: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
|
@ -130,7 +130,7 @@ bool Ascii::OpenFile()
|
|||
if ( fname.front() != '/' && ! path_prefix.empty() )
|
||||
{
|
||||
string path = path_prefix;
|
||||
std::size_t last = path.find_last_not_of("/");
|
||||
std::size_t last = path.find_last_not_of('/');
|
||||
|
||||
if ( last == string::npos ) // Nothing but slashes -- weird but ok...
|
||||
path = "/";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue