diff options
author | sb <sb@openoffice.org> | 2010-01-29 12:57:03 +0100 |
---|---|---|
committer | sb <sb@openoffice.org> | 2010-01-29 12:57:03 +0100 |
commit | 5611c35f047b9568a4a51c243069113fd5b1e462 (patch) | |
tree | 205851c7a351bee80587a1c63b67e4d4cc1d8420 /sal/inc/osl/diagnose.hxx | |
parent | 28c608e8703d036d5475cf93bc278d0177cc48da (diff) |
sb119: #i107473# fix invalid static_cast (patch by dtardon)
Diffstat (limited to 'sal/inc/osl/diagnose.hxx')
-rw-r--r-- | sal/inc/osl/diagnose.hxx | 14 |
1 files changed, 5 insertions, 9 deletions
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<T const*>(*iPos); - OSL_ASSERT( pLeakingObj != 0 ); - static_cast<void>(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<InheritingClassT const*>(this) ); + StaticObjectRegistry::get().registerObject( this ); } ~DebugBase() { - StaticObjectRegistry::get().revokeObject( - static_cast<InheritingClassT const*>(this) ); + StaticObjectRegistry::get().revokeObject( this ); } private: |