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: jdorje@xxxxxxxxxxxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] city_impr_type_iterate
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 6 Mar 2002 12:43:17 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Wed, Mar 06, 2002 at 06:33:51AM -0500, Jason Short wrote:
> Raimar Falke wrote:
> > A third of the impr_type_iterate iterate over the existing buildings
> > of a city. The patch replaces them. This should also give a speedup
> > since I we don't have to call got_building.
> 
> 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?

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]

> It seems to me that cities contain improvements, not improvement types. 
>   But a conversion of this type may be too difficult at this time...

I accept suggestions for another name.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "These download files are in Microsoft Word 6.0 format. After
  unzipping, these files can be viewed in any text editor, including
  all versions of Microsoft Word, WordPad, and Microsoft Word Viewer."
    -- http://www.microsoft.com/hwdev/pc99.htm


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