Andrew Talbot : comdlg32: Remove unnecessary casts.
Alexandre Julliard
julliard at winehq.org
Tue Dec 4 13:25:18 CST 2007
Module: wine
Branch: master
Commit: 750a56016dcd4d09f64381659df618b7830652f2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=750a56016dcd4d09f64381659df618b7830652f2
Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date: Mon Dec 3 22:40:42 2007 +0000
comdlg32: Remove unnecessary casts.
---
dlls/comdlg32/colordlg.c | 2 +-
dlls/comdlg32/filedlg31.c | 6 +++---
dlls/comdlg32/filedlgbrowser.c | 5 ++---
dlls/comdlg32/printdlg.c | 12 ++++++------
4 files changed, 12 insertions(+), 13 deletions(-)
diff --git a/dlls/comdlg32/colordlg.c b/dlls/comdlg32/colordlg.c
index a1cd5f6..aa56ebf 100644
--- a/dlls/comdlg32/colordlg.c
+++ b/dlls/comdlg32/colordlg.c
@@ -1346,7 +1346,7 @@ BOOL WINAPI ChooseColorA( LPCHOOSECOLORA lpChCol )
lpcc->lpCustColors = lpChCol->lpCustColors;
lpcc->Flags = lpChCol->Flags;
lpcc->lCustData = lpChCol->lCustData;
- lpcc->lpfnHook = (LPCCHOOKPROC) lpChCol->lpfnHook;
+ lpcc->lpfnHook = lpChCol->lpfnHook;
if ((lpcc->Flags & CC_ENABLETEMPLATE) && (lpChCol->lpTemplateName)) {
if (HIWORD(lpChCol->lpTemplateName)) {
INT len = MultiByteToWideChar( CP_ACP, 0, lpChCol->lpTemplateName, -1, NULL, 0);
diff --git a/dlls/comdlg32/filedlg31.c b/dlls/comdlg32/filedlg31.c
index 0f697ed..d2e3163 100644
--- a/dlls/comdlg32/filedlg31.c
+++ b/dlls/comdlg32/filedlg31.c
@@ -531,7 +531,7 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
FD31_UpdateFileTitle(lfs);
if (lfs->hook)
{
- lRet = (BOOL)FD31_CallWindowProc(lfs, lfs->fileokstring,
+ lRet = FD31_CallWindowProc(lfs, lfs->fileokstring,
0, lfs->lParam );
if (lRet)
{
@@ -543,7 +543,7 @@ static LRESULT FD31_Validate( const FD31_DATA *lfs, LPCWSTR path, UINT control,
{
if (ofnW->lpstrFile)
{
- LPWSTR str = (LPWSTR)ofnW->lpstrFile;
+ LPWSTR str = ofnW->lpstrFile;
LPWSTR ptr = strrchrW(str, '\\');
str[lstrlenW(str) + 1] = '\0';
*ptr = 0;
@@ -919,7 +919,7 @@ LONG FD31_WMInitDialog(HWND hWnd, WPARAM wParam, LPARAM lParam)
if (ofn->Flags & OFN_HIDEREADONLY)
ShowWindow(GetDlgItem(hWnd, chx1), SW_HIDE);
if (lfs->hook)
- return (BOOL) FD31_CallWindowProc(lfs, WM_INITDIALOG, wParam, lfs->lParam);
+ return FD31_CallWindowProc(lfs, WM_INITDIALOG, wParam, lfs->lParam);
return TRUE;
}
diff --git a/dlls/comdlg32/filedlgbrowser.c b/dlls/comdlg32/filedlgbrowser.c
index 55ef65b..b9c4d2c 100644
--- a/dlls/comdlg32/filedlgbrowser.c
+++ b/dlls/comdlg32/filedlgbrowser.c
@@ -375,8 +375,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
return hRes;
}
/* create an absolute pidl */
- pidlTmp = COMDLG32_PIDL_ILCombine(fodInfos->ShellInfos.pidlAbsCurrent,
- (LPCITEMIDLIST)pidl);
+ pidlTmp = COMDLG32_PIDL_ILCombine(fodInfos->ShellInfos.pidlAbsCurrent, pidl);
}
else if(wFlags & SBSP_PARENT)
{
@@ -388,7 +387,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
else /* SBSP_ABSOLUTE is 0x0000 */
{
/* An absolute pidl (relative from the desktop) */
- pidlTmp = COMDLG32_PIDL_ILClone((LPCITEMIDLIST)pidl);
+ pidlTmp = COMDLG32_PIDL_ILClone(pidl);
psfTmp = GetShellFolderFromPidl(pidlTmp);
}
diff --git a/dlls/comdlg32/printdlg.c b/dlls/comdlg32/printdlg.c
index 39ac750..e04e145 100644
--- a/dlls/comdlg32/printdlg.c
+++ b/dlls/comdlg32/printdlg.c
@@ -3069,12 +3069,12 @@ PRINTDLG_PagePaintProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
scalx = rcClient.right / (double)pda->curdlg.ptPaperSize.x;
scaly = rcClient.bottom / (double)pda->curdlg.ptPaperSize.y;
rcMargin = rcClient;
-
- rcMargin.left += (LONG)pda->curdlg.rtMargin.left * scalx;
- rcMargin.top += (LONG)pda->curdlg.rtMargin.top * scalx;
- rcMargin.right -= (LONG)pda->curdlg.rtMargin.right * scaly;
- rcMargin.bottom -= (LONG)pda->curdlg.rtMargin.bottom * scaly;
-
+
+ rcMargin.left += pda->curdlg.rtMargin.left * scalx;
+ rcMargin.top += pda->curdlg.rtMargin.top * scalx;
+ rcMargin.right -= pda->curdlg.rtMargin.right * scaly;
+ rcMargin.bottom -= pda->curdlg.rtMargin.bottom * scaly;
+
/* if the space is too small then we make sure to not draw anything */
rcMargin.left = min(rcMargin.left, rcMargin.right);
rcMargin.top = min(rcMargin.top, rcMargin.bottom);
More information about the wine-cvs
mailing list