Philipp Lohmann - Sun Germany wrote:
Frank Schönheit - Sun Microsystems Germany wrote:
Hi Kay,
Sorry for the (may be stupid) question, but why not just change
OSL_VERIFY to emit nothing, in case OSL_DEBUG_LEVEL == 0? I would
expect that only weird code would relay on the evaluation in case of
a zero debug level.
Why "weird"? The alternative is something like
#if OSL_DEBUG_LEVEL > 0
bool result =
#endif
callSomeFooWhichSignalsSuccess( bar );
OSL_ENSURE( result, "this was expected to succeed!" );
I definately think that
OSL_VERIFY( callSomeFooWhichSignalsSuccess( bar ) );
is the better (non-weird) alternative here.
That case is weird, because you choose to ignore the return value. In
that you create a possibly not easy to find error. Ignoring return
values is just bad code. Now there certainly are case in which the
return value can be ignored safely, but then an OSL_VERIFY wouldn't be
necessary either. Actually i think we should remove OSL_VERIFY for good.
Can I interpretate this in a way, you to be willing to join our diagnose
and debug macro consolidation meeting?! So, watch out for an event
notification for sometime next week :-)
Just my 2 cents, pl
Kay
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]