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.
> And these case can probably easily be changed to something
> with "assert" (or ensure).
Please show me the easy (!) replacement of the above OSL_VERIFY :)
Or did I completely misunderstand you and you only suggested to replace
the occurences of OSL_VERIFY( a == b )?
> And when we are on it, what are the differences / purposes between
> - OSL_VERIFY
> - OSL_ENSURE
> - OSL_ASSERT
> ? Couldn't we consolidate to just _one_ macro. E.g. OSL_ENSURE because
> of the passed message?
Oh, while we're at it, let me throw in one of my favourites: Shouldn't
we consolidate the DBG_* and OSL_* diagnostics macros?
Ciao
Frank
--
- Frank Schönheit, Software Engineer [EMAIL PROTECTED] -
- Sun Microsystems http://www.sun.com/staroffice -
- OpenOffice.org Database http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]