Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: [patch] const-int-ize SETTINGS_NUM
Home

[Freeciv-Dev] Re: [patch] const-int-ize SETTINGS_NUM

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: [patch] const-int-ize SETTINGS_NUM
From: Falk Hueffner <falk.hueffner@xxxxxxxxxxxxxxxxxxxxxxxx>
Date: 15 Aug 2001 19:15:45 +0200

Justin Moore <justin@xxxxxxxxxxx> writes:

> Just a minor nitpicky patch ...
> 
> Rather than macro-ize SETTINGS_NUM in stdinhand.c and have it
> recalculate the size every time you reference it, why not make it an
> int or const int and save yourself some work?  Patch against 1.12.0
> attached (altho it's probably just as easy to fix it by hand :)).

There's no point in doing so since the compiler will generate
identical code, and you can't use const ints as array size and at some
other places.

        Falk



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