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

@ -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 = "/";