Skip to content
Snippets Groups Projects
Commit 9c165368 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

Glob: Use string comparisons if you have them ready

Change-Id: Ib725299593d9fce88c73fcee2d640def5759b708
parent ef3bfa01
No related branches found
No related tags found
No related merge requests found
......@@ -229,8 +229,7 @@ void Glob::RecurseDirectory(kwsys_stl::string::size_type start,
for ( cc = 0; cc < d.GetNumberOfFiles(); cc ++ )
{
fname = d.GetFile(cc);
if ( strcmp(fname.c_str(), ".") == 0 ||
strcmp(fname.c_str(), "..") == 0 )
if ( fname == "." || fname == ".." )
{
continue;
}
......@@ -310,8 +309,7 @@ void Glob::ProcessDirectory(kwsys_stl::string::size_type start,
for ( cc = 0; cc < d.GetNumberOfFiles(); cc ++ )
{
fname = d.GetFile(cc);
if ( strcmp(fname.c_str(), ".") == 0 ||
strcmp(fname.c_str(), "..") == 0 )
if ( fname == "." || fname == ".." )
{
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment