comctl32: Avoid TRUE:FALSE conditional expressions.
This commit is contained in:
parent
11d35ef8e7
commit
175eaf1074
|
@ -720,7 +720,7 @@ COMBOEX_SetExtendedStyle (COMBOEX_INFO *infoPtr, DWORD mask, DWORD style)
|
||||||
/* see if we need to change the word break proc on the edit */
|
/* see if we need to change the word break proc on the edit */
|
||||||
if ((infoPtr->dwExtStyle ^ dwTemp) & CBES_EX_PATHWORDBREAKPROC)
|
if ((infoPtr->dwExtStyle ^ dwTemp) & CBES_EX_PATHWORDBREAKPROC)
|
||||||
SetPathWordBreakProc(infoPtr->hwndEdit,
|
SetPathWordBreakProc(infoPtr->hwndEdit,
|
||||||
(infoPtr->dwExtStyle & CBES_EX_PATHWORDBREAKPROC) ? TRUE : FALSE);
|
(infoPtr->dwExtStyle & CBES_EX_PATHWORDBREAKPROC) != 0);
|
||||||
|
|
||||||
/* test if the control's appearance has changed */
|
/* test if the control's appearance has changed */
|
||||||
mask = CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT;
|
mask = CBES_EX_NOEDITIMAGE | CBES_EX_NOEDITIMAGEINDENT;
|
||||||
|
|
|
@ -586,7 +586,7 @@ DATETIME_IncreaseField (DATETIME_INFO *infoPtr, int number, int delta)
|
||||||
|
|
||||||
/* Ensure time is within bounds */
|
/* Ensure time is within bounds */
|
||||||
limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM) &range);
|
limits = SendMessageW (infoPtr->hMonthCal, MCM_GETRANGE, 0, (LPARAM) &range);
|
||||||
min = ((delta < 0) ? TRUE : FALSE);
|
min = delta < 0;
|
||||||
|
|
||||||
if (limits & (min ? GDTR_MIN : GDTR_MAX))
|
if (limits & (min ? GDTR_MIN : GDTR_MAX))
|
||||||
{
|
{
|
||||||
|
|
|
@ -372,7 +372,7 @@ static BOOL MONTHCAL_IsDateInValidRange(const MONTHCAL_INFO *infoPtr,
|
||||||
date->wMonth = fix_st->wMonth;
|
date->wMonth = fix_st->wMonth;
|
||||||
}
|
}
|
||||||
|
|
||||||
return fix_st ? FALSE : TRUE;
|
return !fix_st;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Checks passed range width with configured maximum selection count
|
/* Checks passed range width with configured maximum selection count
|
||||||
|
@ -1276,7 +1276,7 @@ MONTHCAL_SetColor(MONTHCAL_INFO *infoPtr, UINT index, COLORREF color)
|
||||||
infoPtr->pens[PenText] = CreatePen(PS_SOLID, 1, infoPtr->colors[index]);
|
infoPtr->pens[PenText] = CreatePen(PS_SOLID, 1, infoPtr->colors[index]);
|
||||||
}
|
}
|
||||||
|
|
||||||
InvalidateRect(infoPtr->hwndSelf, NULL, index == MCSC_BACKGROUND ? TRUE : FALSE);
|
InvalidateRect(infoPtr->hwndSelf, NULL, index == MCSC_BACKGROUND);
|
||||||
return prev;
|
return prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -619,7 +619,7 @@ static BOOL allocate_storage(struct my_IStream *my_is, ULONG add)
|
||||||
else
|
else
|
||||||
my_is->iml_data = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, my_is->iml_data, my_is->iml_data_size);
|
my_is->iml_data = HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, my_is->iml_data, my_is->iml_data_size);
|
||||||
|
|
||||||
return my_is->iml_data ? TRUE : FALSE;
|
return my_is->iml_data != NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE Test_Stream_Write(IStream *iface, const void *pv, ULONG cb,
|
static HRESULT STDMETHODCALLTYPE Test_Stream_Write(IStream *iface, const void *pv, ULONG cb,
|
||||||
|
|
|
@ -3140,7 +3140,7 @@ TOOLBAR_CheckButton (TOOLBAR_INFO *infoPtr, INT Id, LPARAM lParam)
|
||||||
|
|
||||||
btnPtr = &infoPtr->buttons[nIndex];
|
btnPtr = &infoPtr->buttons[nIndex];
|
||||||
|
|
||||||
bChecked = (btnPtr->fsState & TBSTATE_CHECKED) ? TRUE : FALSE;
|
bChecked = (btnPtr->fsState & TBSTATE_CHECKED) != 0;
|
||||||
|
|
||||||
if (LOWORD(lParam) == FALSE)
|
if (LOWORD(lParam) == FALSE)
|
||||||
btnPtr->fsState &= ~TBSTATE_CHECKED;
|
btnPtr->fsState &= ~TBSTATE_CHECKED;
|
||||||
|
|
|
@ -1612,7 +1612,7 @@ TREEVIEW_DeleteItem(TREEVIEW_INFO *infoPtr, HTREEITEM item)
|
||||||
static LRESULT
|
static LRESULT
|
||||||
TREEVIEW_SetRedraw(TREEVIEW_INFO* infoPtr, WPARAM wParam)
|
TREEVIEW_SetRedraw(TREEVIEW_INFO* infoPtr, WPARAM wParam)
|
||||||
{
|
{
|
||||||
infoPtr->bRedraw = wParam ? TRUE : FALSE;
|
infoPtr->bRedraw = wParam != 0;
|
||||||
|
|
||||||
if (infoPtr->bRedraw)
|
if (infoPtr->bRedraw)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue