Re: [AD] New patch for `const'-correctness |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Laurence Withers <lwithers@xxxxxxxxxx> wrote:
>
> Out of interest, do you think it would be wiser to simply enable
> AL_CONST for all compilers, only deselecting when it does not work?
> Feedback from several people has indicated that all the compilers they
> know about support const.
Actually, I don't see why we don't just use `const', then #define it
to nothing when it is unavailable.
> However, declaring pointers as:
>
> type* ptr = 0;
>
> and not
>
> type *ptr = 0;
>
> is better, since you can see that `*' is part of the typename
Yes, but it is ugly :-) I could make a counter-argument, but not here.
> On an off-topic note, is there some utility available for reformatting
> whitespace? I find Allegro's source unreadable at times due to the way
> the indentation jumps all over the place...
I guess you don't have tab set to 8 spaces? If you really need it,
`indent' can probably do what you want, but it'll probably do too
much. Try `sed' or something like that. Remember that if you
reformat the code, it'll be hell making patches.
--
tjaden@xxxxxxxxxx - http://www.psynet.net/tjaden/
A witty remark proves nothing.