[Datadraw-user] utAssert
Brought to you by:
smilindog2000
|
From: Richard P. <rdp...@gm...> - 2009-03-15 21:42:45
|
Hello everyone,
I have an issue with utAssert. Easy to fix technically but there is
possible code break depending on solution chosen.
I was expecting utAssert to be inactive when DD_DEBUG is not set. Actually
it is not the case. This behavior is contrary of what assert() is doing in
regard of NDEBUG. I guess the *right* thing to do is disable utAssert when
DD_DEBUG is off. You will find in my code a lot of:
if(utUnlikely(whatever && wrong && condition)) {
utAssert(!"this should not happen but I won't crash");
getBackOnMyFeet();
}
Although, some of you may prefer to keep utAssert active even when DD_DEBUG
is off. If this is the case, we can, given a #define:
opt-in to utAssert by default, (which would be compatible with current
behavior) or
opt-out to utAssert by default.
What are your preferences? concerns? ideas?
Regards
Richard
plus-one five-one-four five-one-eight eight-one-seven-two
|