Michael Stefaniuc : shell32: Remove superfluous pointer casts from macros.
Alexandre Julliard
julliard at winehq.org
Thu Feb 19 09:18:30 CST 2009
Module: wine
Branch: master
Commit: 8324ed6cc956dab82f983303d47613baf2f57064
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8324ed6cc956dab82f983303d47613baf2f57064
Author: Michael Stefaniuc <mstefani at redhat.de>
Date: Wed Feb 18 22:45:59 2009 +0100
shell32: Remove superfluous pointer casts from macros.
---
dlls/shell32/autocomplete.c | 6 +++---
dlls/shell32/cpanelfolder.c | 18 +++++++++---------
dlls/shell32/dragdrophelper.c | 4 ++--
dlls/shell32/shfldr_fs.c | 18 +++++++++---------
dlls/shell32/shfldr_mycomp.c | 12 ++++++------
dlls/shell32/shfldr_netplaces.c | 6 +++---
6 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/dlls/shell32/autocomplete.c b/dlls/shell32/autocomplete.c
index 2057b25..7646dee 100644
--- a/dlls/shell32/autocomplete.c
+++ b/dlls/shell32/autocomplete.c
@@ -84,9 +84,9 @@ static const IAutoCompleteDropDownVtbl acdropdownvt;
/*
converts This to an interface pointer
*/
-#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
-#define _IAutoComplete2_(This) (IAutoComplete2*)&(This->lpVtbl)
-#define _IAutoCompleteDropDown_(This) (IAutoCompleteDropDown*)&(This->lpDropDownVtbl)
+#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
+#define _IAutoComplete2_(This) ((IAutoComplete2*)&(This)->lpVtbl)
+#define _IAutoCompleteDropDown_(This) (&(This)->lpDropDownVtbl)
static inline IAutoCompleteImpl *impl_from_IAutoCompleteDropDown(IAutoCompleteDropDown *iface)
{
diff --git a/dlls/shell32/cpanelfolder.c b/dlls/shell32/cpanelfolder.c
index 5ef78af..2e4e683 100644
--- a/dlls/shell32/cpanelfolder.c
+++ b/dlls/shell32/cpanelfolder.c
@@ -96,15 +96,15 @@ static inline ICPanelImpl *impl_from_IShellExecuteHookA( IShellExecuteHookA *ifa
/*
converts This to an interface pointer
*/
-#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
-#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
-#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl)
-
-#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2)
-#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2)
-#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
-#define _IShellExecuteHookW_(This) (IShellExecuteHookW*)&(This->lpVtblShellExecuteHookW)
-#define _IShellExecuteHookA_(This) (IShellExecuteHookA*)&(This->lpVtblShellExecuteHookA)
+#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
+#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpVtbl)
+#define _IShellFolder2_(This) (&(This)->lpVtbl)
+
+#define _IPersist_(This) (&(This)->lpVtblPersistFolder2)
+#define _IPersistFolder_(This) (&(This)->lpVtblPersistFolder2)
+#define _IPersistFolder2_(This) (&(This)->lpVtblPersistFolder2)
+#define _IShellExecuteHookW_(This) (&(This)->lpVtblShellExecuteHookW)
+#define _IShellExecuteHookA_(This) (&(This)->lpVtblShellExecuteHookA)
/***********************************************************************
* IShellFolder [ControlPanel] implementation
diff --git a/dlls/shell32/dragdrophelper.c b/dlls/shell32/dragdrophelper.c
index 82ad0d9..5015722 100644
--- a/dlls/shell32/dragdrophelper.c
+++ b/dlls/shell32/dragdrophelper.c
@@ -54,8 +54,8 @@ typedef struct {
static const IDropTargetHelperVtbl vt_IDropTargetHelper;
-#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
-#define _IDropTargetHelper_(This) (IDropTargetHelper*)&(This->lpVtbl)
+#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
+#define _IDropTargetHelper_(This) (&(This)->lpVtbl)
/**************************************************************************
* IDropTargetHelper_Constructor
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
index 891ff4a..25acf40 100644
--- a/dlls/shell32/shfldr_fs.c
+++ b/dlls/shell32/shfldr_fs.c
@@ -110,15 +110,15 @@ static inline IGenericSFImpl *impl_from_ISFHelper( ISFHelper *iface )
/*
converts This to an interface pointer
*/
-#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
-#define _IShellFolder_(This) (IShellFolder*)&(This->lpvtblShellFolder)
-#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpvtblShellFolder)
-#define _IPersist_(This) (IPersist*)&(This->lpvtblPersistFolder3)
-#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpvtblPersistFolder3)
-#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpvtblPersistFolder3)
-#define _IPersistFolder3_(This) (IPersistFolder3*)&(This->lpvtblPersistFolder3)
-#define _IDropTarget_(This) (IDropTarget*)&(This->lpvtblDropTarget)
-#define _ISFHelper_(This) (ISFHelper*)&(This->lpvtblSFHelper)
+#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
+#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpvtblShellFolder)
+#define _IShellFolder2_(This) ((IShellFolder2*)&(This)->lpvtblShellFolder)
+#define _IPersist_(This) (&(This)->lpvtblPersistFolder3)
+#define _IPersistFolder_(This) (&(This)->lpvtblPersistFolder3)
+#define _IPersistFolder2_(This) (&(This)->lpvtblPersistFolder3)
+#define _IPersistFolder3_(This) (&(This)->lpvtblPersistFolder3)
+#define _IDropTarget_(This) (&(This)->lpvtblDropTarget)
+#define _ISFHelper_(This) (&(This)->lpvtblSFHelper)
/**************************************************************************
* registers clipboardformat once
diff --git a/dlls/shell32/shfldr_mycomp.c b/dlls/shell32/shfldr_mycomp.c
index c6ff06e..17f61c9 100644
--- a/dlls/shell32/shfldr_mycomp.c
+++ b/dlls/shell32/shfldr_mycomp.c
@@ -75,13 +75,13 @@ static inline IGenericSFImpl *impl_from_IPersistFolder2( IPersistFolder2 *iface
/*
converts This to an interface pointer
*/
-#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
-#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
-#define _IShellFolder2_(This) (IShellFolder2*)&(This->lpVtbl)
+#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
+#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpVtbl)
+#define _IShellFolder2_(This) (&(This)->lpVtbl)
-#define _IPersist_(This) (IPersist*)&(This->lpVtblPersistFolder2)
-#define _IPersistFolder_(This) (IPersistFolder*)&(This->lpVtblPersistFolder2)
-#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
+#define _IPersist_(This) (&(This)->lpVtblPersistFolder2)
+#define _IPersistFolder_(This) (&(This)->lpVtblPersistFolder2)
+#define _IPersistFolder2_(This) (&(This)->lpVtblPersistFolder2)
/***********************************************************************
* IShellFolder [MyComputer] implementation
diff --git a/dlls/shell32/shfldr_netplaces.c b/dlls/shell32/shfldr_netplaces.c
index 39f61a7..30ab73e 100644
--- a/dlls/shell32/shfldr_netplaces.c
+++ b/dlls/shell32/shfldr_netplaces.c
@@ -69,9 +69,9 @@ static const IPersistFolder2Vtbl vt_NP_PersistFolder2;
#define _ICOM_THIS_From_IPersistFolder2(class, name) class* This = \
(class*)(((char*)name) - FIELD_OFFSET(IGenericSFImpl, lpVtblPersistFolder2))
-#define _IUnknown_(This) (IUnknown*)&(This->lpVtbl)
-#define _IShellFolder_(This) (IShellFolder*)&(This->lpVtbl)
-#define _IPersistFolder2_(This) (IPersistFolder2*)&(This->lpVtblPersistFolder2)
+#define _IUnknown_(This) ((IUnknown*)&(This)->lpVtbl)
+#define _IShellFolder_(This) ((IShellFolder*)&(This)->lpVtbl)
+#define _IPersistFolder2_(This) (&(This)->lpVtblPersistFolder2)
static const shvheader NetworkPlacesSFHeader[] = {
{IDS_SHV_COLUMN1, SHCOLSTATE_TYPE_STR | SHCOLSTATE_ONBYDEFAULT, LVCFMT_RIGHT, 15},
More information about the wine-cvs
mailing list