Re: Pango Performance (was: Re: --gtk-unbuffered)



egger suse de writes:

> On  1 Mar, Tor Lillqvist wrote:
> 
> >  > +  return (1 == has_glyph);
>  
> > It would be preferrable if all of Pango used the same coding style
> > conventions. While I certainly understand the rationale for this style
> > of writing equality tests, it is nonetheless not used in any of the
> > other code, which can be confusing. Or what do others think?
> 
>  Just curious: Whats the rationale for this "strange way to code"?

It catches the '=' vs '==' errors.  For instance:

  return (has_glyph = 1);
  return (has_glyph == 1);

are both valid.

  return (1 = has_glyph);

is not.

-Jonathan






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