diff --git a/ChangeLog b/ChangeLog index c7cadadbb..0e0687365 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2012-07-03 Werner Lemberg + + [autofit] Minor speed-up. + + * src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap + elements if they are equal. + 2012-06-30 Gilles Espinasse Fix `checking if gcc static flag -static works' test. diff --git a/src/autofit/afangles.c b/src/autofit/afangles.c index 790af1779..653d3f692 100644 --- a/src/autofit/afangles.c +++ b/src/autofit/afangles.c @@ -5,7 +5,7 @@ /* Routines used to compute vector angles with limited accuracy */ /* and very high speed. It also contains sorting routines (body). */ /* */ -/* Copyright 2003-2006, 2011 by */ +/* Copyright 2003-2006, 2011-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -255,7 +255,7 @@ { for ( j = i; j > 0; j-- ) { - if ( table[j] > table[j - 1] ) + if ( table[j] >= table[j - 1] ) break; swap = table[j]; @@ -278,7 +278,7 @@ { for ( j = i; j > 0; j-- ) { - if ( table[j].org > table[j - 1].org ) + if ( table[j].org >= table[j - 1].org ) break; swap = table[j];