Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: init_techs integrated patch (PR#999)
Home

[Freeciv-Dev] Re: init_techs integrated patch (PR#999)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Arien Malec <arien_malec@xxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: init_techs integrated patch (PR#999)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 11 Oct 2001 21:25:30 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Oct 11, 2001 at 12:10:52PM -0700, Arien Malec wrote:
> 
> --- Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx> wrote:
> > It looks to me that the termination with A_LAST is optional if the
> > tech list is of size MAX_NUM_TECH_LIST. So you can have
> > MAX_NUM_TECH_LIST items in a tech list. This is my reading of
> > lookup_tech_list.
> 
> Good point: the documentation for lookup_tech_list should be changed

Possible. However such a change should be done in a more central place

>, or it should fill only to (MAX_NUM_TECH_LIST - 1).

This would mean changes in packets.c and an extra capability for no
good reason.

> Nitpick: the boundary conditions for the for loop are effectively tested in 
> two
> different places (in the for statement &  as an explicit break), which makes 
> it
> hard to read, IMHO. I'd prefer either a long for condition, or a while loop.

I prefer for loops. Even if they look like:

 for(;;)
 {
   if(some_cond)
      break;
   STUFF
   if(some_other_cond)
      break;
 }

You can make a proposal for the style guide.

I will add a comment to lookup_tech_list. Are there any other open
issues left with the patch?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 A life? Cool! Where can I download one?


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