Permalink
Browse files

util/patternMatch: break when pattern is found

Signed-off-by: Adrian Negreanu <adrian.m.negreanu@intel.com>
  • Loading branch information...
groleo committed Feb 27, 2014
1 parent d7f9bbe commit 6d8c3184fadb1834223236b13471797089e4a004
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/util.cpp
@@ -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);
}

0 comments on commit 6d8c318

Please sign in to comment.