Complete.Org: Mailing Lists: Archives: freeciv-dev: November 2002:
[Freeciv-Dev] Re: (PR#173) City names are re-used
Home

[Freeciv-Dev] Re: (PR#173) City names are re-used

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: tamasis@xxxxxxxxxxxx
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#173) City names are re-used
From: "Jason Short via RT" <rt@xxxxxxxxxxxxxx>
Date: Thu, 14 Nov 2002 11:13:35 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Paul Zastoupil via RT wrote:

> Or a pointer to where in the list you are.

Unfortunately no, since the list isn't traversed linearly (because of 
the natural city naming scheme).  Currently for each possible name the 
code checks to see if a city already exists by this name (IIRC it may 
check either only this civ's names or all names, depending on settings). 
  This is inefficient (O(n^2) where n is the number of cities you have 
already), but generally not a problem.

jason




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