]> git.wh0rd.org Git - fontconfig.git/commitdiff
Prevent terrible perf regression by getting the if-condition right
authorPatrick Lam <plam@MIT.EDU>
Thu, 20 Apr 2006 16:57:50 +0000 (16:57 +0000)
committerPatrick Lam <plam@MIT.EDU>
Thu, 20 Apr 2006 16:57:50 +0000 (16:57 +0000)
    (reported by Wouter Bolsterlee).

ChangeLog
src/fcmatch.c

index 0f83c24e9213335af3f098fb0fbf790bf142d93c..919f0bd6843cccf7436de2a32c9a2a351a782104 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,4 @@
-2006-04-19  Patrick Lam         <plam@mit.edu>
+2006-04-20  Patrick Lam         <plam@mit.edu>
        * ChangeLog:
        * README:
        * configure.in:
@@ -6,6 +6,12 @@
 
        Bump version to 2.3.95.
 
+2006-04-20  Patrick Lam  <plam@mit.edu>
+       * src/fcmatch.c (FcSortWalk):
+
+       Prevent terrible perf regression by getting the if-condition
+       right (reported by Wouter Bolsterlee).
+
 2006-04-19  Patrick Lam         <plam@mit.edu>
            Dominic Lachowicz  <cinamod@hotmail.com>
 
index ae37fd701a73950b7898b752f5e081fe8ad3fb68..8d0fbc37ffe2e1a318347f229657d96e843fc7bd 100644 (file)
@@ -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)
                     {