[Libreoffice] [PATCH] cppcheck warning in sw/source/ui/uiview/viewprt.cxx
Noel Power
nopower at novell.com
Tue Oct 5 02:24:44 PDT 2010
On Mon, 2010-10-04 at 21:31 +0100, Michael Meeks wrote:
> Hi Noel,
>
> On Mon, 2010-10-04 at 08:13 -0600, Noel Power wrote:
> > current ASSERT-like macro
>
> Ah - is there some easy cleanup task that we can spec up to switch lots
> of obsolete assert macros to nice clean, new assert macros (or at least
> consistent ones) ? :-) If so, can we have it in the wiki ?
I do think there is a task here but... part of the problem is what
ASSERT macros to use, I have to admit I don't know ) as it seems this is
part of a bigger problem around a whole slew of
debug/trace/logging/assert type utility macros. I just looked in the
code and I see there are at least 2 distinct versions. OSL_XXXX &
DBG_XXXXX e.g.
[ osl/diagnose.h ]
OSL_ASSERT, OSL_ENSURE, OSL_PRECOND, OSL_POSTCOND, OSL_TRACE etc.
[ tools/debug.hxx ]
DBG_ASSERT, DBG_BG_ASSERT, DBG_TRACE[1..N], DBG_WARNING etc.
and to make things even clearer in [ vos/diagnose.hxx ]
VOS_ASSERT - ( defined basically as OSL_ASSERT )
haha and also in sw/inc/errhdl.hxx some yet another variant ASSERT,
ASSERT_ID
probably there are even more ?
IMO getting rid any additional macros other than DBG_XXXX & OSL_XXXX is
an idea. The OSL vs DBG I would guess is a bigger task ( possibly even
religous war ) and but ideally I guess is more about merging the
functionality from one to the other ( and ending up with just one )
Anybody have any idea or thoughts about that ?
> Michael.
>
regards,
Noel
More information about the LibreOffice
mailing list