Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2002:
[Freeciv-Dev] Re: [Patch] moves_left
Home

[Freeciv-Dev] Re: [Patch] moves_left

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx, freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] moves_left
From: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Date: Tue, 12 Feb 2002 12:41:12 +0000 (GMT)

 --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote: > 
> I assume you guess it: moves_left is uses as a boolean comparison. Bla
> bla bla.
> 
>       Raimar

>  
> -  if (!punit->moves_left) return 1;
> +  if (punit->moves_left == 0) return 1;

to be even more fail safe, you can do 
if (punit->moves_left <= 0 ) return 1;

BTW, this all is very nice, but you are fixing the code that is already
quite ok.  How about doing something more challenging / useful ?

Best,
G.

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


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