Per Inge Mathisen schreef:
> On 8/3/07, Giel van Schijndel <[EMAIL PROTECTED]> wrote:
>> No, that should _not_ be the case. Const specifiers on non-pointer
>> parameters do _not_ need to occur in the function declaration, only in
>> the function definition. Especially so since it is an implementation
>> detail of that function, which none of it's users (i.e. functions
>> calling this function) ever have to deal with.
> Why are you declaring it const? Modern compilers are smart enough to
> figure out how to best use a variable in the local scope anyway...
I believe the previous implementation was a bit dirty and I think I used
a const specifier to make it easier to fix that. I only used the const
specifier there to ensure the compiler would choke on code attempting to
write to that variable. Although looking at it now I see it isn't
necessary anymore.
> Also, if it generates a warning, why not make the header match the
> implementation definition? Is anything hurt by it?
Nope, I'm just a bit of a standard purist I guess. Plus the fact that it
was really *too* late when I wrote that mail. So I'll fix it ;-)


Attachment: signature.asc
Description: OpenPGP digital signature

Warzone-dev mailing list

Reply via email to