freetype-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Devel] defects in ftgrays.c


From: Graham Asher
Subject: [Devel] defects in ftgrays.c
Date: Tue, 25 Sep 2001 15:08:33 +0100

While adapting the routines in ftgrays.c I have noticed a few defects. 
These affect efficiency, not correctness, but are probably worth fixing.

1. compute_cbox takes an unnecessary argument specifying the outline. The 
outline is already available as a member of TRaster (ras.outline).

2. The local static version of FT_Outline_Decompose uses variables 'shift' 
and 'delta' which are always zero. These variables can be removed. The 
macro SCALED (defined as '#define SCALED( x )  ( ( (x) << shift ) - delta 
)') thus becomes unnecessary and can be removed completely.

3. The function Move_To calls record_cell, which can fail, but ignores its 
return value.

4. start_cell calls set_cell but ignores its return value, which is an 
error code; start_cell should itself return an error value.

Best wishes,

Graham Asher




reply via email to

[Prev in Thread] Current Thread [Next in Thread]