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

[Freeciv-Dev] Re: [Patch] city_impr_type_iterate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: rf13@xxxxxxxxxxxxxxxxxxxxxx
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [Patch] city_impr_type_iterate
From: Ben Webb <ben@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Mar 2002 12:03:46 +0000 (GMT)

On Wed, 6 Mar 2002, Raimar Falke wrote:

> On Wed, Mar 06, 2002 at 06:33:51AM -0500, Jason Short wrote:
> > What about the (currently nonexistent) improvement types that a city can 
> > build more than one of?  Will they (hypothetically) be included multiple 
> > times in the iteration?

        Support for such types would require many more changes throughout 
the code anyway. It's a lot of work for very little (IMHO) tangible 
benefit.

> This is the problem of the person who implements this. Nevertheless
> this patch makes it easier. It unified test like:
>  city_got_building(pcity, i)
>  pcity->improvements[i] != I_NONE
>  pcity->improvements[i] != 0
>  pcity->improvements[i]

        Well sure, but the last two shouldn't really be used anyway, as 
pcity->improvements should hold the values I_NONE etc. - i.e. it should 
really be an enum. (You can blame me for this.) Why not just use 
city_got_building() everywhere, though?

        Ben
-- 
ben@xxxxxxxxxxxxxxxxxxxxxx           http://bellatrix.pcl.ox.ac.uk/~ben/
"The dog did nothing in the night-time." "That was the curious 
incident," remarked Sherlock Holmes.
        - 'Silver Blaze', Sir Arthur Conan Doyle



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