[Freeciv-Dev] Re: (PR#4298) Coding style
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sun, May 25, 2003 at 09:20:02AM -0700, a-l@xxxxxxx wrote:
> "Mike Kaufman" <kaufman@xxxxxxxxxxxxxxxxxxxxxx> wrote:
>
> > o I only glanced at the code, but it looks like there are a few places that
> > need to be restylified.
>
> Ok, in some cases I divert.. I think A looks more clear than B, see
> below. But if you don't like it, I can just follow the styleguide
> stringently. No problem.
>
>
> A)
> if (x < 0 && !L_updated) L_scheduled = TRUE;
> else if (x > 0 && !R_updated) R_scheduled = TRUE;
> if (y < 0 && !T_updated) T_scheduled = TRUE;
> else if (y > 0 && !B_updated) B_scheduled = TRUE;
>
> B)
> if (x < 0 && !L_updated) {
> L_scheduled = TRUE;
> } else if (x > 0 && !R_updated) {
> R_scheduled = TRUE;
> if (y < 0 && !T_updated) {
> T_scheduled = TRUE;
> } else if (y > 0 && !B_updated) {
> B_scheduled = TRUE;
> }
hmm, well I think that B) should actually be:
if (x < 0 && !L_updated) {
L_scheduled = TRUE;
} else if (x > 0 && !R_updated) {
R_scheduled = TRUE;
}
if (y < 0 && !T_updated) {
T_scheduled = TRUE;
} else if (y > 0 && !B_updated) {
B_scheduled = TRUE;
}
I too have issues with some unnecessary brackets, but the style guide is a
good compromise for everyone, follow it.
-mike
- [Freeciv-Dev] (PR#4289) Pixel scroller, a-l@xxxxxxx, 2003/05/23
- Message not available
- [Freeciv-Dev] Re: (PR#4289) Pixel scroller, a-l@xxxxxxx, 2003/05/24
- Message not available
- [Freeciv-Dev] Re: (PR#4289) Pixel scroller, ChrisK@xxxxxxxx, 2003/05/24
- Message not available
- [Freeciv-Dev] Re: (PR#4289) Pixel scroller, a-l@xxxxxxx, 2003/05/25
- Message not available
- [Freeciv-Dev] (PR#4298) Coding style, a-l@xxxxxxx, 2003/05/25
- Message not available
- [Freeciv-Dev] Re: (PR#4298) Coding style,
Mike Kaufman <=
Message not available
|
|