Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: new natural names patch (PR#1127)
Home

[Freeciv-Dev] Re: new natural names patch (PR#1127)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Cc: jdorje@xxxxxxxxxxxxxxxxxxxxx, freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: new natural names patch (PR#1127)
From: Adam Olsen <rhamph@xxxxxxxx>
Date: Sun, 6 Jan 2002 15:30:22 +0000

On Sun, Jan 06, 2002 at 04:15:09PM +0100, Raimar Falke wrote:
> On Sat, Dec 22, 2001 at 12:31:31PM -0800, jdorje@xxxxxxxxxxxxxxxxxxxxx wrote:
> > +       /* transform to lower case */
> > +       for (k = 0; k < strlen(namebuf); k++) {
> > +         namebuf[k] = tolower(namebuf[k]);
> > +       }
> 
> Doing this transformation for every city in every nation seems
> sub-optimal. Although I don't suspect a performance difference the
> reader wonders why this is done every time.

Doing the transformation every time shouldn't matter much.  But doing
a strlen on *every* iteration of the transformation WILL.


-- 
Adam Olsen, aka Rhamphoryncus


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