wingdi.h: fix the Get[RGB]Value macros

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

 



This solves a few annoying warnings...

ChangeLog
    The Get[RGB]Value() macros should return a BYTE, not the
    same type as the one passed in.

Index: include/wingdi.h
===================================================================
RCS file: /var/cvs/wine/include/wingdi.h,v
retrieving revision 1.94
diff -u -r1.94 wingdi.h
--- include/wingdi.h	28 Aug 2003 21:43:35 -0000	1.94
+++ include/wingdi.h	11 Sep 2003 03:51:50 -0000
@@ -420,9 +420,9 @@
 #define PALETTERGB(r,g,b)   (0x02000000 | RGB(r,g,b))
 #define PALETTEINDEX(i)     ((COLORREF)(0x01000000 | (WORD)(i)))
 
-#define GetRValue(rgb)	    ((rgb) & 0xff)
-#define GetGValue(rgb)      (((rgb) >> 8) & 0xff)
-#define GetBValue(rgb)	    (((rgb) >> 16) & 0xff)
+#define GetRValue(rgb)      ((BYTE)  (rgb) )
+#define GetGValue(rgb)      ((BYTE) ((rgb) >> 8))
+#define GetBValue(rgb)      ((BYTE) ((rgb) >> 16))
 
 #define GetKValue(cmyk)     ((BYTE)  (cmyk) )
 #define GetYValue(cmyk)     ((BYTE) ((cmyk) >> 8))


-- 
Dimi.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux