On Tue, Mar 9, 2021 at 1:20 PM Walter Harms <[email protected]> wrote:
>
> hi Madhurkiran Harikrishnan,
> my experience is that readability reduced rapidly with indent-level.
> I would suggest:
>
>  if ( ! DevHasCursor(pDev) continue;
>
> pCursorInfo = GetSprite(pDev);
>
> if (!pCursorInfo) continue; // just to shrink the if ()
>
>
> // no braces needed
>  if ( pCursorInfo->isUp &&
>        pCursorInfo->pScreen == pScreen)
>                  miSpriteSaveUnderCursor(pDev, pScreen);

Not using braces here, with a line-wrapped conditional, is a bad idea.
Especially in nested control flow.
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to