comdlg32: Remove duplicate code (PVS-Studio).

This commit is contained in:
André Hentschel 2014-10-28 00:02:11 +01:00 committed by Alexandre Julliard
parent 9b810cd6e8
commit c4747f46cf
1 changed files with 3 additions and 18 deletions

View File

@ -3270,7 +3270,6 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
int iIndentation;
TEXTMETRICW tm;
LPSFOLDER tmpFolder;
LookInInfos *liInfos = GetPropA(pDIStruct->hwndItem,LookInInfosStr);
UINT shgfi_flags = SHGFI_PIDL | SHGFI_OPENICON | SHGFI_SYSICONINDEX | SHGFI_DISPLAYNAME;
UINT icon_width, icon_height;
@ -3293,16 +3292,8 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
shgfi_flags |= SHGFI_SMALLICON;
}
if(pDIStruct->itemID == liInfos->uSelectedItem)
{
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
}
else
{
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
}
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
/* Is this item selected ? */
if(pDIStruct->itemState & ODS_SELECTED)
@ -3320,16 +3311,10 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
/* Do not indent item if drawing in the edit of the combo */
if(pDIStruct->itemState & ODS_COMBOBOXEDIT)
{
iIndentation = 0;
ilItemImage = (HIMAGELIST) SHGetFileInfoW ((LPCWSTR) tmpFolder->pidlItem,
0, &sfi, sizeof (sfi), shgfi_flags );
}
else
{
iIndentation = tmpFolder->m_iIndent;
}
/* Draw text and icon */
/* Initialise the icon display area */