Re: listview: fix alignment tests

2005-01-14 Thread Dimitrie O. Paun
On Fri, Jan 14, 2005 at 11:32:56AM +0100, Paul Vriens wrote:
> HDF_LEFT is also 0, so should we get rid of the first check, and only
> check for LVCFMT_RIGHT and LVCFMT_CENTER?

Yes, you could remove it, but it will save nothing and will make the
code harder to read. gcc most like optimizes it out anyway.
Let's leave it in.

-- 
Dimi.



Re: listview: fix alignment tests

2005-01-14 Thread Paul Vriens
Dimitrie O. Paun wrote:
>
> ChangeLog
> Use the LVCFMT_{LEFT,RIGHT,CENTER} enumeration flags properly.
>
>   /* set text alignment (leftmost column must be left-aligned) */
> -if (nColumn == 0 || lpColumn->fmt & LVCFMT_LEFT)
> +if (nColumn == 0 || (lpColumn->fmt & LVCFMT_JUSTIFYMASK) ==
> LVCFMT_LEFT)
>  lphdi->fmt |= HDF_LEFT;

HDF_LEFT is also 0, so should we get rid of the first check, and only
check for LVCFMT_RIGHT and LVCFMT_CENTER?

>
>  if (lpColumn->fmt & LVCFMT_BITMAP_ON_RIGHT)
>
> --
> Dimi.
>
>
Cheers,

Paul.