Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: == NULL && != NULL
Home

[Freeciv-Dev] Re: == NULL && != NULL

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: == NULL && != NULL
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 10 Feb 2002 20:38:35 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Sun, Feb 10, 2002 at 01:52:26PM -0500, Greg Wooledge wrote:
> Raimar Falke (hawk@xxxxxxxxxxxxxxxxxxxxxxx) wrote:
> 
> > No. But there are some constructs like "int c; .... if(c)" which
> > bother splint.
> 
> I'd like to point out that there's a big difference between this:
> 
>   int c;
>   if (c) do_something();
> 
> and this:
> 
>   int is_blue;
>   if (is_blue) do_something();
> 
> At least IMHO.

Ack. Main culprits here are "punit->fuel", "punit->moves_left",
"punit->homecity", "pcity->did_buy" (no this one isn't a bool) and a
lot of simple counters (especially in AI code). So the is_*s aren't
the problem.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  This customer comes into the computer store. "I'm looking for a mystery
  Adventure Game with lots of graphics. You know, something realy
  challenging". "Well," replied the clerk, "have you tried Windows 98 ?"


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