Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Hi,

Since the flamewar is already going on :p, is it OK not put a space after '(' nor
before ')' in test and calls?

I find this more readable whitout the spaces...

Le 2012-08-16 20:12, Bjoern Michaelsen a écrit :
Hi Michael,

first: Thanks for keeping an old StarDivision tradition alive!

On Thu, Aug 16, 2012 at 07:07:38PM +0200, Michael Stahl wrote:
apparently somebody thought it a great idea to mandate Allman style for

Someone has an evil grin on his face.

1) if the condition is long, then put the opening brace on a new line.

rationale: in this case it's good to visually separate the condition
from the compound statement, e.g. this is a PITA to read:

> if ( !pFly->Lower() || !pFly->Lower()->IsNoTxtFrm() || > !((SwNoTxtFrm*)pFly->Lower())->HasAnimation()) > pFly->RefreshLaySubsidiary( pPage, rRect );

> if (bCalledFromShell && !lcl_IsItemSet(*pNewTxtNd, RES_PARATR_ADJUST) &&
>             SFX_ITEM_SET == pAnchorNode->GetSwAttrSet().
>             GetItemState(RES_PARATR_ADJUST, sal_True, &pItem))
> static_cast<SwCntntNode *>(pNewTxtNd)->SetAttr(*pItem);

IMHO, these monster conditions deserve local static inline functions
with a name
that says what the heck they are testing for anyway.

Best,

Bjoern

P.S.: Here is a fish for the trollbait: <0())))<
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

--
Jean-Tiare LE BIGOT

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.