]> git.wh0rd.org - fontconfig.git/commitdiff
Make FcStrCmpIgnoreCase a bit faster
authorKeith Packard <keithp@keithp.com>
Wed, 12 Feb 2003 18:20:04 +0000 (18:20 +0000)
committerKeith Packard <keithp@keithp.com>
Wed, 12 Feb 2003 18:20:04 +0000 (18:20 +0000)
src/fcstr.c

index 3a31b22584b976b4ef775c033eee4b3ed11487fe..533e91d9d3f900367660d4ef42b8e5acb3395cc8 100644 (file)
@@ -72,12 +72,15 @@ FcStrCmpIgnoreCase (const FcChar8 *s1, const FcChar8 *s2)
     {
        c1 = *s1++;
        c2 = *s2++;
-       if (!c1 || !c2)
+       if (!c1)
            break;
-       c1 = FcToLower (c1);
-       c2 = FcToLower (c2);
        if (c1 != c2)
-           break;
+       {
+           c1 = FcToLower (c1);
+           c2 = FcToLower (c2);
+           if (c1 != c2)
+               break;
+       }
     }
     return (int) c1 - (int) c2;
 }