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: Justin Moore <justin@xxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: [patch] const-int-ize SETTINGS_NUM
From: Trent Piepho <xyzzy@xxxxxxxxxxxxx>
Date: Wed, 15 Aug 2001 11:58:19 -0700 (PDT)

On Wed, 15 Aug 2001, Justin Moore wrote:
>    I'm familiar with the construct and is actually used in my
> scorelog.[ch] patch.  I've always seen it as a const int, though, usually
> because it's used entirely in a looping construct.  I guess I'll go back
> and harrass the programmer(s) from whom I picked up this bad habit. :)

Just for fun, I checked the linux 2.2.19 kernel.

There are 21 lines with #define, NUM_, and sizeof on the same line.
There are 45 lines with #define, MAX_, and sizeof on the same line.

66 instances of people using a macro.

There are 0 lines with const, NUM_, and sizeof on the same line.
There are 0 lines with const, MAX_, and sizeof on the same line.

No instances of people using a const int.



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