[Freeciv-Dev] Re: new natural names patch (PR#1127)
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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
|
|