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));