Module: wine Branch: master Commit: 373f8ff1033cf50281e8f83446fc818b4bfe5fc8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=373f8ff1033cf50281e8f83446...
Author: Michael Stefaniuc mstefani@redhat.de Date: Sun Nov 2 22:35:17 2008 +0100
uxtheme: Remove superflous casts.
---
dlls/uxtheme/draw.c | 12 ++++++------ dlls/uxtheme/msstyles.c | 6 +++--- dlls/uxtheme/system.c | 4 ++-- dlls/uxtheme/uxini.c | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/uxtheme/draw.c b/dlls/uxtheme/draw.c index ff0ac9e..8280c66 100644 --- a/dlls/uxtheme/draw.c +++ b/dlls/uxtheme/draw.c @@ -1177,8 +1177,8 @@ static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state, + (LTRBOuterMono[uType & (BDR_INNER|BDR_OUTER)] != -1 ? 1 : 0);
/* Init some vars */ - OuterPen = InnerPen = (HPEN)GetStockObject(NULL_PEN); - SavePen = (HPEN)SelectObject(hdc, InnerPen); + OuterPen = InnerPen = GetStockObject(NULL_PEN); + SavePen = SelectObject(hdc, InnerPen); spx = spy = epx = epy = 0; /* Satisfy the compiler... */
/* Determine the colors of the edges */ @@ -1373,8 +1373,8 @@ static HRESULT draw_diag_edge (HDC hdc, HTHEME theme, int part, int state, HPEN hpsave; HPEN hp = get_edge_pen ((uFlags & BF_MONO) ? EDGE_WINDOW : EDGE_FILL, theme, part, state); - hbsave = (HBRUSH)SelectObject(hdc, hb); - hpsave = (HPEN)SelectObject(hdc, hp); + hbsave = SelectObject(hdc, hb); + hpsave = SelectObject(hdc, hp); Polygon(hdc, Points, 4); SelectObject(hdc, hbsave); SelectObject(hdc, hpsave); @@ -1426,8 +1426,8 @@ static HRESULT draw_rect_edge (HDC hdc, HTHEME theme, int part, int state, && !(uFlags & (BF_FLAT|BF_MONO)) ) ? E_FAIL : S_OK;
/* Init some vars */ - LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = (HPEN)GetStockObject(NULL_PEN); - SavePen = (HPEN)SelectObject(hdc, LTInnerPen); + LTInnerPen = LTOuterPen = RBInnerPen = RBOuterPen = GetStockObject(NULL_PEN); + SavePen = SelectObject(hdc, LTInnerPen);
/* Determine the colors of the edges */ if(uFlags & BF_MONO) diff --git a/dlls/uxtheme/msstyles.c b/dlls/uxtheme/msstyles.c index d0fbb11..8aa67fd 100644 --- a/dlls/uxtheme/msstyles.c +++ b/dlls/uxtheme/msstyles.c @@ -132,14 +132,14 @@ HRESULT MSSTYLES_OpenThemeFile(LPCWSTR lpThemeFile, LPCWSTR pszColorName, LPCWST hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); goto invalid_theme; } - pszColors = (LPWSTR)LoadResource(hTheme, hrsc); + pszColors = LoadResource(hTheme, hrsc);
if(!(hrsc = FindResourceW(hTheme, MAKEINTRESOURCEW(1), szSizeNamesResource))) { TRACE("Size names resource not found\n"); hr = HRESULT_FROM_WIN32(ERROR_BAD_FORMAT); goto invalid_theme; } - pszSizes = (LPWSTR)LoadResource(hTheme, hrsc); + pszSizes = LoadResource(hTheme, hrsc);
/* Validate requested color against what's available from the theme */ if(pszColorName) { @@ -298,7 +298,7 @@ static PUXINI_FILE MSSTYLES_GetActiveThemeIni(PTHEME_FILE tf) TRACE("FILERESNAMES map not found\n"); return NULL; } - tmp = (LPWSTR)LoadResource(tf->hTheme, hrsc); + tmp = LoadResource(tf->hTheme, hrsc); dwResourceIndex = (dwSizeCount * dwColorNum) + dwSizeNum; for(i=0; i < dwResourceIndex; i++) { tmp += lstrlenW(tmp)+1; diff --git a/dlls/uxtheme/system.c b/dlls/uxtheme/system.c index 3630a6d..d213ba2 100644 --- a/dlls/uxtheme/system.c +++ b/dlls/uxtheme/system.c @@ -122,7 +122,7 @@ static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue, WCHAR cNull = '\0'; nBytesToAlloc = dwUnExpDataLen;
- szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc); + szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc); RegQueryValueExW (hKey, lpszValue, 0, NULL, (LPBYTE)szData, &nBytesToAlloc); dwExpDataLen = ExpandEnvironmentStringsW(szData, &cNull, 1); dwUnExpDataLen = max(nBytesToAlloc, dwExpDataLen); @@ -131,7 +131,7 @@ static DWORD query_reg_path (HKEY hKey, LPCWSTR lpszValue, else { nBytesToAlloc = (lstrlenW(pvData) + 1) * sizeof(WCHAR); - szData = (LPWSTR) LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc ); + szData = LocalAlloc(LMEM_ZEROINIT, nBytesToAlloc ); lstrcpyW(szData, pvData); dwExpDataLen = ExpandEnvironmentStringsW(szData, pvData, MAX_PATH ); if (dwExpDataLen > MAX_PATH) dwRet = ERROR_MORE_DATA; diff --git a/dlls/uxtheme/uxini.c b/dlls/uxtheme/uxini.c index 85efdb1..02c5443 100644 --- a/dlls/uxtheme/uxini.c +++ b/dlls/uxtheme/uxini.c @@ -68,7 +68,7 @@ PUXINI_FILE UXINI_LoadINI(HMODULE hTheme, LPCWSTR lpName) { TRACE("Loading resource INI %s\n", debugstr_w(lpName));
if((hrsc = FindResourceW(hTheme, lpName, szTextFileResource))) { - if(!(lpThemesIni = (LPCWSTR)LoadResource(hTheme, hrsc))) { + if(!(lpThemesIni = LoadResource(hTheme, hrsc))) { TRACE("%s resource not found\n", debugstr_w(lpName)); return NULL; }