From b2b6903259c742c75738d49fa37ea0b167ef87cb Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 12 Feb 2003 18:20:04 +0000 Subject: [PATCH] Make FcStrCmpIgnoreCase a bit faster --- src/fcstr.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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; } -- 2.39.5