From 5611c35f047b9568a4a51c243069113fd5b1e462 Mon Sep 17 00:00:00 2001 From: sb Date: Fri, 29 Jan 2010 12:57:03 +0100 Subject: sb119: #i107473# fix invalid static_cast (patch by dtardon) --- sal/inc/osl/diagnose.hxx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sal/inc/osl/diagnose.hxx') diff --git a/sal/inc/osl/diagnose.hxx b/sal/inc/osl/diagnose.hxx index 799a5a035885..ea27f1d00003 100644 --- a/sal/inc/osl/diagnose.hxx +++ b/sal/inc/osl/diagnose.hxx @@ -128,19 +128,17 @@ public: VoidPointerSet::const_iterator iPos(m_data.m_addresses.begin()); VoidPointerSet::const_iterator const iEnd(m_data.m_addresses.end()); for ( ; iPos != iEnd; ++iPos ) { - T const* pLeakingObj = static_cast(*iPos); - OSL_ASSERT( pLeakingObj != 0 ); - static_cast(pLeakingObj); + OSL_ASSERT( *iPos != 0 ); } } return bRet; } - void registerObject( T const* pObj ) { + void registerObject( void const* pObj ) { osl_detail_ObjectRegistry_registerObject(m_data, pObj); } - void revokeObject( T const* pObj ) { + void revokeObject( void const* pObj ) { osl_detail_ObjectRegistry_revokeObject(m_data, pObj); } @@ -191,12 +189,10 @@ public: protected: DebugBase() { - StaticObjectRegistry::get().registerObject( - static_cast(this) ); + StaticObjectRegistry::get().registerObject( this ); } ~DebugBase() { - StaticObjectRegistry::get().revokeObject( - static_cast(this) ); + StaticObjectRegistry::get().revokeObject( this ); } private: -- cgit