Complete.Org: Mailing Lists: Archives: freeciv-dev: September 2001:
[Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954)
Home

[Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Gaute B Strokkenes <gs234@xxxxxxxxx>
Cc: s.yeates@xxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [Patch] Population counter overflow (PR#954)
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 13 Sep 2001 08:53:13 +0200
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Thu, Sep 13, 2001 at 01:16:14AM +0200, Gaute B Strokkenes wrote:
> On Wed, 12 Sep 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> > On Wed, Sep 12, 2001 at 09:03:18PM +0200, Gaute B Strokkenes wrote:
> >> On Wed, 12 Sep 2001, hawk@xxxxxxxxxxxxxxxxxxxxxxx wrote:
> >> >> We could change the return value from city_population from
> >> >> citizens to thousand of citizens.
> >> > 
> >> > A patch which should fix this is attached. Can you test it
> >> > please?
> >> 
> >> You have forgotten to take into account the places where
> >> city_population() is used other than the client, mainly in
> >> common/game.c.
> > 
> > No I haven't. score.literacy is divided by the population
> > later. Although I have to admit I haven't tested it.
> 
> Hm.  Well, there's still rank_calc_mil_service() in server/report.c.
> 
> And I notice that in a lot of places you are passing 0 instead of 3 to
> the new int_to_text() where the latter is appropriate.  Which brings
> me on to my next point: remembering to pass 0 or 3 to int_to_text()
> like this seems clumsy and error-prone.  Better to add something
> called population_to_text(), and perhaps do this for spaceships too.

Well a really nice solution would be to rename int_to_text(int) to
general_int_to_text(int,int) and leave the old interface
int_to_text(int). Then you can either add a population_to_text() or a
POPULATION_DECIMAL_SHIFT.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 Q:  Do you know what the death rate around here is?
 A:  One per person.


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