[PATCH] DrawDibDraw flag handling

Dimitrie O. Paun dpaun at rogers.com
Thu Oct 14 10:36:55 CDT 2004


On Thu, Oct 14, 2004 at 05:21:41PM +0200, Andreas Mohr wrote:
> Hi,
> 
> On Thu, Oct 14, 2004 at 03:53:41PM +0100, Peter Riocreux wrote:
> >      if (!(wFlags & DDF_DONTDRAW) && whdd->hpal)
> > -        SelectPalette(hdc, whdd->hpal, FALSE);
> > +      if ((wFlags & DDF_BACKGROUNDPAL) && ! (wFlags & DDF_SAME_HDC))
> > +       SelectPalette(hdc, whdd->hpal, TRUE);
> > +      else
> > +       SelectPalette(hdc, whdd->hpal, FALSE);
> This is rather non-obvious if handling, I'm surprised that the compiler
> doesn't warn about it, or does it?
> 
> Could you add proper braces there?

Better yet, what about we just do:
	+       SelectPalette(hdc, whdd->hpal, (wFlags & DDF_BACKGROUNDPAL) && ! (wFlags & DDF_SAME_HDC));

-- 
Dimi.



More information about the wine-devel mailing list