[autofit] Minor speed-up.
* src/autofit/afangles (af_sort_pos, af_sort_widths): Don't swap elements if they are equal.
This commit is contained in:
parent
ad866e2c9a
commit
d4cbbf35d4
@ -1,3 +1,10 @@
|
||||
2012-07-03 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[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 <g.esp@free.fr>
|
||||
|
||||
Fix `checking if gcc static flag -static works' test.
|
||||
|
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user