[HarfBuzz] hb_font_funcs_is_immutable() is wrong

Behdad Esfahbod behdad at behdad.org
Wed Oct 13 07:41:27 PDT 2010


On 10/13/10 10:04, Jonathan Kew wrote:
> Hi Behdad,
> 
> This function, from hb-font.cc, doesn't look right to me.....
> 
>   hb_bool_t
>   hb_font_funcs_is_immutable (hb_font_funcs_t *ffuncs)
>   {
>     return ffuncs->immutable = TRUE;
>   }
> 
> I suggest removing the "= TRUE" here!

Doh.  Copy/paste error!

> (Maybe it'd be worth declaring the parameter as const for "query" functions like this -- then the compiler would have noticed this one.)

Yes, sprinkling const around the API was in my todo list for today.

behdad

> JK
> 
> 



More information about the HarfBuzz mailing list