Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2004:
[Freeciv-Dev] Re: (PR#8773) rewrite city_map_iterate
Home

[Freeciv-Dev] Re: (PR#8773) rewrite city_map_iterate

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] Re: (PR#8773) rewrite city_map_iterate
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 22 May 2004 15:38:03 -0700
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=8773 >

Gregory Berkolaiko wrote:
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=8773 >
> 
> On Sat, 22 May 2004, rwetmore@xxxxxxxxxxxx wrote:
> 
>><URL: http://rt.freeciv.org/Ticket/Display.html?id=8773 >
>>
>>There is a patch cityclean.zip from Jan '01 that does a better job on
>>these iterators and in fact will integrate better with the direction
>>being followed by the generalized citymap patch.
> 
> I cannot find it in the archives.

PR#1233.

This patch is quite outdated.  Generally I find when looking for 
inspiration it's better to go straight to Ross's full corecleanups patch 
(a patch from ~2 years ago is still in incoming).  Do a cvs up -D and 
apply the patch, then look at the code you're wondering about.

Using an array solution is fine with me, but someone has to code it. 
And the method used in the corecleanups (a compile-time-generated array) 
is no good since these iterators may (in future) vary by topology, 
CITY_MAP_RADIUS, or even per-city.  This is not easy to deal with in an 
array solution.  Finally the claim that it is substantially faster than 
a (possibly inline) mathematical calculation has not actually been 
demonstrated.

jason




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