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: Gregory Berkolaiko <gberkolaiko@xxxxxxxxxxx>
Cc: freeciv development list <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] moves_left
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 12 Feb 2002 14:06:49 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Feb 12, 2002 at 12:41:12PM +0000, Gregory Berkolaiko wrote:
>  --- 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;

The above transformation doesn't change a thing. I have tried to
reduce the noise level. So for example I haven't run the lines I have
changed through indent if this would break lines in another way.

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

This is IMHO also the job of a maintainer to maintain things.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  reality.sys corrupt. Reboot Universe? (y,n,q)


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