Re: [patch] remove getSelectionSpan

2004-12-06 Thread Andre Poenitz
On Mon, Dec 06, 2004 at 02:11:55PM +0100, Lars Gullik Bjønnes wrote: > Andre Poenitz <[EMAIL PROTECTED]> writes: > > | Could you please add that to the coding style rules. IIRC the general > | rule is to avoid unnecessary braces in general but I agree that this is > | a case where the unnecessary

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: >> Lars> Like this perhaps: >> >> + int foo = (forba() == hans ? some1() : some2()); >> + -NOT- >> + int foo = forba() == hans ? some1() : some2(); >> >> I would think that >> + int foo = (forba() == hans) ?

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Angus Leeming
Jean-Marc Lasgouttes wrote: > Lars> Like this perhaps: > > + int foo = (forba() == hans ? some1() : some2()); > + -NOT- > + int foo = forba() == hans ? some1() : some2(); > > I would think that > + int foo = (forba() == hans) ? some1() : some2(); > is clearer in this case. Is it j

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Jean-Marc Lasgouttes
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> Like this perhaps: + int foo = (forba() == hans ? some1() : some2()); + -NOT- + int foo = forba() == hans ? some1() : some2(); I would think that + int foo = (forba() == hans) ? some1() : some2(); is cl

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Lars Gullik Bjønnes
Andre Poenitz <[EMAIL PROTECTED]> writes: | Could you please add that to the coding style rules. IIRC the general | rule is to avoid unnecessary braces in general but I agree that this is | a case where the unnecessary braces might even be preferable. Like this perhaps: ? rules-1.diff Index: Cod

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Alfredo Braunstein
Lars Gullik BjÃnnes wrote: > Alfredo Braunstein <[EMAIL PROTECTED]> writes: > > | + int max_depth = beg != 0 ? pars_[beg - 1].getMaxDepthAfter() : 0; > > Please add some parenthesis: int m = (foo ? dfd : fdf); > Even if not needed it is a tiny bit clearer. > > | + int max_depth = beg != 0 ?

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Andre Poenitz
On Mon, Dec 06, 2004 at 09:07:02AM +0100, Lars Gullik Bjønnes wrote: > Alfredo Braunstein <[EMAIL PROTECTED]> writes: > > | + int max_depth = beg != 0 ? pars_[beg - 1].getMaxDepthAfter() : 0; > > Please add some parenthesis: int m = (foo ? dfd : fdf); > Even if not needed it is a tiny bit clear

Re: [patch] remove getSelectionSpan

2004-12-06 Thread Lars Gullik Bjønnes
Alfredo Braunstein <[EMAIL PROTECTED]> writes: | + int max_depth = beg != 0 ? pars_[beg - 1].getMaxDepthAfter() : 0; Please add some parenthesis: int m = (foo ? dfd : fdf); Even if not needed it is a tiny bit clearer. | + int max_depth = beg != 0 ? pars_[beg - 1].getMaxDepthAfter() : 0;