gdiplus: Remove some superfluous casts.

Michael Stefaniuc mstefani at redhat.de
Fri Dec 5 00:53:04 CST 2008


---
 dlls/gdiplus/font.c         |    2 +-
 dlls/gdiplus/image.c        |    3 ++-
 dlls/gdiplus/tests/region.c |    4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/dlls/gdiplus/font.c b/dlls/gdiplus/font.c
index 2366823..220409b 100644
--- a/dlls/gdiplus/font.c
+++ b/dlls/gdiplus/font.c
@@ -256,7 +256,7 @@ GpStatus WINGDIPAPI GdipCreateFontFromDC(HDC hdc, GpFont **font)
     if(!font)
         return InvalidParameter;
 
-    hfont = (HFONT)GetCurrentObject(hdc, OBJ_FONT);
+    hfont = GetCurrentObject(hdc, OBJ_FONT);
     if(!hfont)
         return GenericError;
 
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 683e9b7..0c61056 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -370,7 +370,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromResource(HINSTANCE hInstance,
         return InvalidParameter;
 
     /* load DIB */
-    hbm = (HBITMAP)LoadImageW(hInstance,lpBitmapName,IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
+    hbm = LoadImageW(hInstance, lpBitmapName, IMAGE_BITMAP, 0, 0,
+                     LR_CREATEDIBSECTION);
 
     if(hbm){
         stat = GdipCreateBitmapFromHBITMAP(hbm, NULL, bitmap);
diff --git a/dlls/gdiplus/tests/region.c b/dlls/gdiplus/tests/region.c
index 15363f2..1373634 100644
--- a/dlls/gdiplus/tests/region.c
+++ b/dlls/gdiplus/tests/region.c
@@ -765,7 +765,7 @@ todo_wine{
     }
 
     GdipDeleteRegion(region);
-    DeleteObject((HGDIOBJ)hrgn);
+    DeleteObject(hrgn);
 
     /* ellipse */
     hrgn = CreateEllipticRgn(0, 0, 100, 10);
@@ -791,7 +791,7 @@ todo_wine{
     expect_dword(buf + 8, 0x00006000); /* ?? */
 }
     GdipDeleteRegion(region);
-    DeleteObject((HGDIOBJ)hrgn);
+    DeleteObject(hrgn);
 }
 
 static void test_gethrgn(void)
-- 
1.6.0.rc1
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081205/59eef636/attachment-0001.pgp 


More information about the wine-patches mailing list