Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] (PR#4298) Coding style
Home

[Freeciv-Dev] (PR#4298) Coding style

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#4298) Coding style
From: "a-l@xxxxxxx" <a-l@xxxxxxx>
Date: Sun, 25 May 2003 09:20:02 -0700
Reply-to: rt@xxxxxxxxxxxxxx

"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;
  }


Arnstein



[Prev in Thread] Current Thread [Next in Thread]