Add a shortcut for FcQualAny matching

When checking whether a test matches a pattern,
we cut the loop short for FcQualAll when we see
the first non-matching value, but for FcQualAny
we were always walking the full list. This patch
cuts the loop short for FcQualAny when we see the
first matching value.
This commit is contained in:
Matthias Clasen 2020-08-18 15:02:21 -04:00
parent 8022ab4aff
commit 1b0cb23adc
1 changed files with 2 additions and 0 deletions

View File

@ -1550,6 +1550,8 @@ FcConfigMatchValueList (FcPattern *p,
{
if (!ret)
ret = v;
if (t->qual != FcQualAll)
break;
}
else
{