Commit 563d229b authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

shell32: Avoid TRUE:FALSE conditional expressions.

parent 4d28aeda
...@@ -1024,7 +1024,7 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam, ...@@ -1024,7 +1024,7 @@ static INT_PTR CALLBACK BrsFolderDlgProc( HWND hWnd, UINT msg, WPARAM wParam,
case BFFM_ENABLEOK: case BFFM_ENABLEOK:
TRACE("Enable %ld\n", lParam); TRACE("Enable %ld\n", lParam);
EnableWindow(GetDlgItem(hWnd, 1), (lParam)?TRUE:FALSE); EnableWindow(GetDlgItem(hWnd, 1), lParam != 0);
break; break;
case BFFM_SETOKTEXT: /* unicode only */ case BFFM_SETOKTEXT: /* unicode only */
......
...@@ -1814,7 +1814,7 @@ BOOL _ILIsDesktop(LPCITEMIDLIST pidl) ...@@ -1814,7 +1814,7 @@ BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
{ {
TRACE("(%p)\n",pidl); TRACE("(%p)\n",pidl);
return pidl && pidl->mkid.cb ? FALSE : TRUE; return !pidl || !pidl->mkid.cb;
} }
BOOL _ILIsMyComputer(LPCITEMIDLIST pidl) BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
......
...@@ -2855,12 +2855,8 @@ BOOL WINAPI SHGetSpecialFolderPathA ( ...@@ -2855,12 +2855,8 @@ BOOL WINAPI SHGetSpecialFolderPathA (
int nFolder, int nFolder,
BOOL bCreate) BOOL bCreate)
{ {
return (SHGetFolderPathA( return SHGetFolderPathA(hwndOwner, nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), NULL, 0,
hwndOwner, szPath) == S_OK;
nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0),
NULL,
0,
szPath)) == S_OK ? TRUE : FALSE;
} }
/************************************************************************* /*************************************************************************
...@@ -2872,12 +2868,8 @@ BOOL WINAPI SHGetSpecialFolderPathW ( ...@@ -2872,12 +2868,8 @@ BOOL WINAPI SHGetSpecialFolderPathW (
int nFolder, int nFolder,
BOOL bCreate) BOOL bCreate)
{ {
return (SHGetFolderPathW( return SHGetFolderPathW(hwndOwner, nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0), NULL, 0,
hwndOwner, szPath) == S_OK;
nFolder + (bCreate ? CSIDL_FLAG_CREATE : 0),
NULL,
0,
szPath)) == S_OK ? TRUE : FALSE;
} }
/************************************************************************* /*************************************************************************
......
...@@ -1705,10 +1705,7 @@ ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject, ...@@ -1705,10 +1705,7 @@ ISFDropTarget_DragEnter (IDropTarget * iface, IDataObject * pDataObject,
TRACE ("(%p)->(DataObject=%p)\n", This, pDataObject); TRACE ("(%p)->(DataObject=%p)\n", This, pDataObject);
InitFormatEtc (fmt, This->cfShellIDList, TYMED_HGLOBAL); InitFormatEtc (fmt, This->cfShellIDList, TYMED_HGLOBAL);
This->fAcceptFmt = IDataObject_QueryGetData (pDataObject, &fmt) == S_OK;
This->fAcceptFmt = (S_OK == IDataObject_QueryGetData (pDataObject, &fmt)) ?
TRUE : FALSE;
ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect); ISFDropTarget_QueryDrop (iface, dwKeyState, pdwEffect);
return S_OK; return S_OK;
......
...@@ -290,9 +290,9 @@ static void CheckToolbar(IShellViewImpl * This) ...@@ -290,9 +290,9 @@ static void CheckToolbar(IShellViewImpl * This)
if (IsInCommDlg(This)) if (IsInCommDlg(This))
{ {
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
FCIDM_TB_SMALLICON, (This->FolderSettings.ViewMode==FVM_LIST)? TRUE : FALSE, &result); FCIDM_TB_SMALLICON, This->FolderSettings.ViewMode == FVM_LIST, &result);
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON, IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_CHECKBUTTON,
FCIDM_TB_REPORTVIEW, (This->FolderSettings.ViewMode==FVM_DETAILS)? TRUE : FALSE, &result); FCIDM_TB_REPORTVIEW, This->FolderSettings.ViewMode == FVM_DETAILS, &result);
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON,
FCIDM_TB_SMALLICON, TRUE, &result); FCIDM_TB_SMALLICON, TRUE, &result);
IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON, IShellBrowser_SendControlMsg(This->pShellBrowser, FCW_TOOLBAR, TB_ENABLEBUTTON,
...@@ -606,7 +606,7 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl) ...@@ -606,7 +606,7 @@ static BOOLEAN LV_AddItem(IShellViewImpl * This, LPCITEMIDLIST pidl)
lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/ lvItem.lParam = (LPARAM) ILClone(ILFindLastID(pidl)); /*set the item's data*/
lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/ lvItem.pszText = LPSTR_TEXTCALLBACKW; /*get text on a callback basis*/
lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/ lvItem.iImage = I_IMAGECALLBACK; /*get the image on a callback basis*/
return (-1==ListView_InsertItemW(This->hWndList, &lvItem))? FALSE: TRUE; return ListView_InsertItemW(This->hWndList, &lvItem) != -1;
} }
/********************************************************** /**********************************************************
......
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