mirror of
https://github.com/morgan9e/FreeRDP
synced 2026-04-15 00:44:19 +09:00
[c23] simplify boolean checks
This commit is contained in:
@@ -671,8 +671,5 @@ BOOL gdi_BitBlt(HGDI_DC hdcDest, INT32 nXDest, INT32 nYDest, INT32 nWidth, INT32
|
||||
break;
|
||||
}
|
||||
|
||||
if (!gdi_InvalidateRegion(hdcDest, nXDest, nYDest, nWidth, nHeight))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return gdi_InvalidateRegion(hdcDest, nXDest, nYDest, nWidth, nHeight);
|
||||
}
|
||||
|
||||
@@ -1367,8 +1367,7 @@ static UINT gdi_SurfaceToSurface(RdpgfxClientContext* context,
|
||||
|
||||
WINPR_ASSERT(context->GetSurfaceData);
|
||||
surfaceSrc = (gdiGfxSurface*)context->GetSurfaceData(context, surfaceToSurface->surfaceIdSrc);
|
||||
sameSurface =
|
||||
(surfaceToSurface->surfaceIdSrc == surfaceToSurface->surfaceIdDest) ? TRUE : FALSE;
|
||||
sameSurface = (surfaceToSurface->surfaceIdSrc == surfaceToSurface->surfaceIdDest);
|
||||
|
||||
if (!sameSurface)
|
||||
surfaceDst =
|
||||
|
||||
@@ -548,13 +548,8 @@ inline BOOL gdi_EqualRgn(const GDI_RGN* hSrcRgn1, const GDI_RGN* hSrcRgn2)
|
||||
{
|
||||
WINPR_ASSERT(hSrcRgn1);
|
||||
WINPR_ASSERT(hSrcRgn2);
|
||||
if ((hSrcRgn1->x == hSrcRgn2->x) && (hSrcRgn1->y == hSrcRgn2->y) &&
|
||||
(hSrcRgn1->w == hSrcRgn2->w) && (hSrcRgn1->h == hSrcRgn2->h))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return ((hSrcRgn1->x == hSrcRgn2->x) && (hSrcRgn1->y == hSrcRgn2->y) &&
|
||||
(hSrcRgn1->w == hSrcRgn2->w) && (hSrcRgn1->h == hSrcRgn2->h));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -228,10 +228,7 @@ BOOL gdi_FillRect(HGDI_DC hdc, const GDI_RECT* rect, HGDI_BRUSH hbr)
|
||||
break;
|
||||
}
|
||||
|
||||
if (!gdi_InvalidateRegion(hdc, nXDest, nYDest, nWidth, nHeight))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
return gdi_InvalidateRegion(hdc, nXDest, nYDest, nWidth, nHeight);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user