Commit 0a51e54f authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

oleview: Remove superfluous pointer casts.

parent 78457300
......@@ -46,7 +46,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
U(tvis).item.mask = TVIF_TEXT;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.pszText = wszTree;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = parent;
while(TRUE)
......@@ -61,7 +61,7 @@ static void CreateRegRec(HKEY hKey, HTREEITEM parent, WCHAR *wszKeyName, BOOL ad
{
if(!i && lstrlenW(wszKeyName) > 1)
{
U(tvis).item.pszText = (LPWSTR)wszKeyName;
U(tvis).item.pszText = wszKeyName;
addPlace = TreeView_InsertItem(details.hReg, &tvis);
U(tvis).item.pszText = wszTree;
}
......@@ -213,7 +213,7 @@ static void CreateReg(WCHAR *buffer)
U(tvis).item.mask = TVIF_TEXT;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.pszText = wszTree;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = TVI_ROOT;
path = buffer;
......@@ -225,7 +225,7 @@ static void CreateReg(WCHAR *buffer)
{
*path = '\0';
if(RegOpenKey(HKEY_CLASSES_ROOT, (LPWSTR)buffer, &hKey) != ERROR_SUCCESS)
if(RegOpenKey(HKEY_CLASSES_ROOT, buffer, &hKey) != ERROR_SUCCESS)
return;
lastLenBuffer = lenBuffer+1;
......@@ -259,9 +259,9 @@ static void CreateReg(WCHAR *buffer)
else break;
}
if(RegOpenKey(HKEY_CLASSES_ROOT, (LPWSTR)buffer, &hKey) != ERROR_SUCCESS) return;
if(RegOpenKey(HKEY_CLASSES_ROOT, buffer, &hKey) != ERROR_SUCCESS) return;
CreateRegRec(hKey, addPlace, (LPWSTR)&buffer[lenBuffer+1], TRUE);
CreateRegRec(hKey, addPlace, &buffer[lenBuffer+1], TRUE);
RegCloseKey(hKey);
......
......@@ -515,7 +515,7 @@ static BOOL InitInstance(HINSTANCE hInst, int nCmdShow)
if(!hWnd) return FALSE;
globals.hStatusBar = CreateStatusWindow(WS_VISIBLE|WS_CHILD,
(LPWSTR)wszTitle, hWnd, 0);
wszTitle, hWnd, 0);
globals.hToolBar = CreateToolbarEx(hWnd, WS_CHILD|WS_VISIBLE, 0, 1, hInst,
IDB_TOOLBAR, tB, 10, 16, 16, 16, 16, sizeof(TBBUTTON));
......
......@@ -77,7 +77,7 @@ void CreateInst(HTREEITEM item, WCHAR *wszMachineName)
memset(&tvis, 0, sizeof(TVINSERTSTRUCT));
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
U(tvis).item.pszText = tvi.pszText;
tvis.hParent = item;
tvis.hInsertAfter = TVI_LAST;
......@@ -263,7 +263,7 @@ static void AddCOMandAll(void)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_CHILDREN;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.cChildren = 1;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
if(RegOpenKey(HKEY_CLASSES_ROOT, wszCLSID, &hKey) != ERROR_SUCCESS) return;
......@@ -346,7 +346,7 @@ static void AddApplicationID(void)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
tvis.hParent = tree.hAID;
if(RegOpenKey(HKEY_CLASSES_ROOT, wszAppID, &hKey) != ERROR_SUCCESS) return;
......@@ -391,7 +391,7 @@ static void AddTypeLib(void)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
tvis.hParent = tree.hTL;
if(RegOpenKey(HKEY_CLASSES_ROOT, wszTypeLib, &hKey) != ERROR_SUCCESS) return;
......@@ -457,7 +457,7 @@ static void AddInterfaces(void)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
tvis.hParent = tree.hI;
if(RegOpenKey(HKEY_CLASSES_ROOT, wszInterface, &hKey) != ERROR_SUCCESS) return;
......@@ -499,7 +499,7 @@ static void AddComponentCategories(void)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM|TVIF_CHILDREN;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
if(tree.hGBCC) tvis.hParent = tree.hGBCC;
else tvis.hParent = TVI_ROOT;
U(tvis).item.cChildren = 1;
......@@ -546,7 +546,7 @@ static void AddBaseEntries(void)
U(tvis).item.pszText = name;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.cChildren = 1;
tvis.hInsertAfter = (HTREEITEM)TVI_FIRST;
tvis.hInsertAfter = TVI_FIRST;
tvis.hParent = TVI_ROOT;
LoadString(globals.hMainInst, IDS_TREE_I, U(tvis).item.pszText,
......
......@@ -209,7 +209,7 @@ static void AddToTLDataStrWithTabsW(TYPELIB_DATA *pTLData, WCHAR *wszSource)
{
int lineLen = lstrlenW(wszSource);
int newLinesNo = 0;
WCHAR *pSourcePos = (WCHAR *)wszSource;
WCHAR *pSourcePos = wszSource;
WCHAR *pSourceBeg;
if(!lineLen) return;
......@@ -223,8 +223,8 @@ static void AddToTLDataStrWithTabsW(TYPELIB_DATA *pTLData, WCHAR *wszSource)
pTLData->idl = HeapReAlloc(GetProcessHeap(), 0, pTLData->idl,
sizeof(WCHAR)*(pTLData->idlLen+lineLen+4*newLinesNo+1));
pSourcePos = (WCHAR *)wszSource;
pSourceBeg = (WCHAR *)wszSource;
pSourcePos = wszSource;
pSourceBeg = wszSource;
while(newLinesNo)
{
if(*pSourcePos != *wszNewLine && *pSourcePos)
......@@ -379,7 +379,7 @@ static int EnumVars(ITypeInfo *pTypeInfo, int cVars, HTREEITEM hParent)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.pszText = wszText;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = hParent;
for(i=0; i<cVars; i++)
......@@ -443,7 +443,7 @@ static int EnumEnums(ITypeInfo *pTypeInfo, int cVars, HTREEITEM hParent)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.pszText = wszText;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = hParent;
for(i=0; i<cVars; i++)
......@@ -507,7 +507,7 @@ static int EnumFuncs(ITypeInfo *pTypeInfo, TYPEATTR *pTypeAttr, HTREEITEM hParen
BOOL bFirst;
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = hParent;
cFuncs = pTypeAttr->cFuncs;
......@@ -736,7 +736,7 @@ static int EnumImplTypes(ITypeInfo *pTypeInfo, int cImplTypes, HTREEITEM hParent
U(tvis).item.mask = TVIF_TEXT;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.pszText = wszInheritedInterfaces;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = hParent;
tvis.hParent = TreeView_InsertItem(typelib.hTree, &tvis);
......@@ -1182,7 +1182,7 @@ static int PopulateTree(void)
U(tvis).item.mask = TVIF_TEXT|TVIF_PARAM;
U(tvis).item.cchTextMax = MAX_LOAD_STRING;
U(tvis).item.pszText = wszText;
tvis.hInsertAfter = (HTREEITEM)TVI_LAST;
tvis.hInsertAfter = TVI_LAST;
tvis.hParent = TVI_ROOT;
if(FAILED((hRes = LoadTypeLib(typelib.wszFileName, &pTypeLib))))
......@@ -1635,7 +1635,7 @@ BOOL CreateTypeLibWindow(HINSTANCE hInst, WCHAR *wszFileName)
if(!globals.hTypeLibWnd) return FALSE;
typelib.hStatusBar = CreateStatusWindow(WS_VISIBLE|WS_CHILD,
(LPWSTR)wszTitle, globals.hTypeLibWnd, 0);
wszTitle, globals.hTypeLibWnd, 0);
TypeLibResizeChild();
return TRUE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment