Commit 29e3b1d8 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

SystemTools: Use .rfind('/') rather than .find_last_of("/")

It's faster since it doesn't have a second string to loop over.

Change-Id: I8a5917ad356db38e18cc370276edb76ce3027a17
parent 7ffb7106
......@@ -3692,7 +3692,7 @@ kwsys_stl::string SystemTools::GetFilenameName(const kwsys_stl::string& filename
#if defined(_WIN32)
kwsys_stl::string::size_type slash_pos = filename.find_last_of("/\\");
#else
kwsys_stl::string::size_type slash_pos = filename.find_last_of("/");
kwsys_stl::string::size_type slash_pos = filename.rfind('/');
#endif
if(slash_pos != kwsys_stl::string::npos)
{
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment