Re: [AD] About create_bitmap

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Wed, 03 Nov 2004 18:31:02 +0100, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> Well, you could use a simple #define. The vast majority of uses of
> create_bitmap will not need a check - so this is a very special use.
> There's of course no problem with create_bitmap, nobody would notice it.
> But in general, I don't think it is a good idea. Else, we end up having
> error checking for every single function, like OpenGL.

I don't see error checking as a bad thing. It's not hard to do, and in
fact is already done via ASSERT. What's so bad about changing an
ASSERT (which applies only to debugmode) to if (which is always
checked)? The function is not speed-critical, so the more error
checking the better. And I think it would be more useful than you
think, since there are several situations where you just obtain
numbers and then pass them directly to create_bitmap. And trying to
track down an error of this type becomes a lot harder if you can only
catch it in debugmode.

- Kitty Cat




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/