[Freeciv-Dev] Re: [patch] const-int-ize SETTINGS_NUM
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
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.
|
|