goto
should not be used, would ASSERT()
be an issue to be used as well? Or should we be using a different approach?
ID:1503896
Feb 22 2014, 6:56 pm (Edited on Feb 22 2014, 8:10 pm)
(See the best response by LordAndrew.)
|
|
I've never seen this proc until today. I'm here to ask whether or not this is to be used. Similarly how
goto should not be used, would ASSERT() be an issue to be used as well? Or should we be using a different approach? |
So, pretty much there most likely wouldn't be anything wrong with this that would cause weird errors?
Sorry if I'm being too broad with my questions. I'm just helping someone with programming and he is using ASSERT(). Trying to get rid of some bugs for him since there's been some crashing. |
In response to Xirre
|
|
ASSERT() shouldn't be causing any issues, unless he's doing something really weird with it. It's pretty much just an if statement that calls CRASH() if what you're asserting isn't true.
|
Internally ASSERT() is defined in stddef.dm as:
#define ASSERT(c) if(!(c)) {CRASH("[__FILE__]:[__LINE__]:Assertion Failed: [#c]"); }