From: Keith Packard Date: Wed, 12 Feb 2003 18:20:04 +0000 (+0000) Subject: Make FcStrCmpIgnoreCase a bit faster X-Git-Tag: fc-2_1_91~30 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=b2b6903259c742c75738d49fa37ea0b167ef87cb;p=fontconfig.git Make FcStrCmpIgnoreCase a bit faster --- diff --git a/src/fcstr.c b/src/fcstr.c index 3a31b22..533e91d 100644 --- a/src/fcstr.c +++ b/src/fcstr.c @@ -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; }