Make FcStrCmpIgnoreCase a bit faster

This commit is contained in:
Keith Packard 2003-02-12 18:20:04 +00:00
parent c8d5753c0f
commit b2b6903259
1 changed files with 7 additions and 4 deletions

View File

@ -72,12 +72,15 @@ FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
{ {
c1 = *s1++; c1 = *s1++;
c2 = *s2++; c2 = *s2++;
if (!c1 || !c2) if (!c1)
break; break;
c1 = FcToLower (c1);
c2 = FcToLower (c2);
if (c1 != c2) if (c1 != c2)
break; {
c1 = FcToLower (c1);
c2 = FcToLower (c2);
if (c1 != c2)
break;
}
} }
return (int) c1 - (int) c2; return (int) c1 - (int) c2;
} }