wingdi.h: fix the Get[RGB]Value macros
Dimitrie O. Paun
dpaun at rogers.com
Wed Sep 10 22:56:21 CDT 2003
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.
More information about the wine-patches
mailing list