Commit 6d8c3184 authored by Adrian Negreanu's avatar Adrian Negreanu

util/patternMatch: break when pattern is found

Signed-off-by: 's avatarAdrian Negreanu <adrian.m.negreanu@intel.com>
parent d7f9bbed
......@@ -7445,7 +7445,7 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList)
QCString pattern;
for (it.toFirst();(pattern=it.current());++it)
{
if (!pattern.isEmpty() && !found)
if (!pattern.isEmpty())
{
int i=pattern.find('=');
if (i!=-1) pattern=pattern.left(i); // strip of the extension specific filter name
......@@ -7458,6 +7458,7 @@ bool patternMatch(const QFileInfo &fi,const QStrList *patList)
found = found || re.match(fi.fileName().data())!=-1 ||
re.match(fi.filePath().data())!=-1 ||
re.match(fi.absFilePath().data())!=-1;
if (found) break;
//printf("Matching `%s' against pattern `%s' found=%d\n",
// fi->fileName().data(),pattern.data(),found);
}
......
Markdown is supported
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