From: Patrick Lam Date: Thu, 20 Apr 2006 16:57:50 +0000 (+0000) Subject: Prevent terrible perf regression by getting the if-condition right X-Git-Tag: fc-2_3_95~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=55e145b0250e5c233d9fed1f8f5efe690374cdf2;p=fontconfig.git Prevent terrible perf regression by getting the if-condition right (reported by Wouter Bolsterlee). --- diff --git a/ChangeLog b/ChangeLog index 0f83c24..919f0bd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -2006-04-19 Patrick Lam +2006-04-20 Patrick Lam * ChangeLog: * README: * configure.in: @@ -6,6 +6,12 @@ Bump version to 2.3.95. +2006-04-20 Patrick Lam + * src/fcmatch.c (FcSortWalk): + + Prevent terrible perf regression by getting the if-condition + right (reported by Wouter Bolsterlee). + 2006-04-19 Patrick Lam Dominic Lachowicz diff --git a/src/fcmatch.c b/src/fcmatch.c index ae37fd7..8d0fbc3 100644 --- a/src/fcmatch.c +++ b/src/fcmatch.c @@ -808,7 +808,7 @@ FcSortWalk (FcSortNode **n, int nnode, FcFontSet *fs, FcCharSet **cs, FcBool tri */ if (!trim || !*cs || !FcCharSetIsSubset (ncs, *cs)) { - if (!trim && build_cs) + if (trim || build_cs) { if (*cs) {