Re: [AD] Two dumb little patches |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
First of all, I'm not really a big fan of preprocessor magic or tricks to
modify syntax. So I may be biased.
> I made a couple little patches. The first one defines a DIALOG_END macro
> that users can put at the end of DIALOG structs, without worrying about
> warnings with -W or having to type NULL and 0 a bunch of times. Used
> like this:
>
> DIALOG dialog[] = {
> { d_clear_proc, ... },
> { d_text_proc, ... },
> { DIALOG_END }
> };
Heh. I like this... I'd probably use it myself if it were added. It also
makes the code a lot cleaner and easier to read.
> The second makes code shutting down graphics look cleaner. Used like
this:
>
> set_gfx_mode(GFX_NONE);
This one I'm not sure about... we'll probably get people confused and
thinking that C supports optional arguments just as C++ does, or worse
write
set_gfx_mode(GFX_NONE, 0, 0, 0, 0);
Actually, that is a danger for the first one as well.
If we're going to vote on this, I vote for including the first but not the
second.
Evert