diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 14:24:48 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-02-12 14:26:47 +0000 |
commit | 9cbc25dd6e31fc5fd2a25067fe924626451f9376 (patch) | |
tree | cc8a211dde494f5d908438542f4975628bdb356d /svtools | |
parent | 27fae00bf28def2c23228101dac7cf8280c498b5 (diff) |
Revert "coverity#736486 try and make coverity see through this better"
This reverts commit a0bae848d42b675e4638420d632d710ed3cf76c3.
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/misc/itemdel.cxx | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx index d6f7d65e4e63..ad5624083c3e 100644 --- a/svtools/source/misc/itemdel.cxx +++ b/svtools/source/misc/itemdel.cxx @@ -38,13 +38,12 @@ class SfxItemDesruptor_Impl Link aLink; private: - DECL_LINK( Delete, SfxItemDesruptor_Impl * ); - SfxItemDesruptor_Impl( const SfxItemDesruptor_Impl& ); // n.i. + DECL_LINK( Delete, void * ); + SfxItemDesruptor_Impl( const SfxItemDesruptor_Impl& ); // n.i. public: - SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ); - void LaunchDeleteOnIdle(); - ~SfxItemDesruptor_Impl(); + SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ); + ~SfxItemDesruptor_Impl(); }; // ------------------------------------------------------------------------ @@ -56,10 +55,7 @@ SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ): DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" ); pItem->SetKind( SFX_ITEMS_DELETEONIDLE ); -} -void SfxItemDesruptor_Impl::LaunchDeleteOnIdle() -{ // process in Idle GetpApp()->InsertIdleHdl( aLink, 1 ); } @@ -79,18 +75,18 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl() } // ------------------------------------------------------------------------ -IMPL_LINK(SfxItemDesruptor_Impl, Delete, SfxItemDesruptor_Impl*, pImpl) +IMPL_LINK_NOARG(SfxItemDesruptor_Impl, Delete) { {DBG_CHKTHIS(SfxItemDesruptor_Impl, 0);} - delete pImpl; + delete this; return 0; } -void DeleteItemOnIdle(SfxPoolItem* pItem) +// ------------------------------------------------------------------------ +void DeleteItemOnIdle( SfxPoolItem* pItem ) { DBG_ASSERT( 0 == pItem->GetRefCount(), "deleting item in use" ); - SfxItemDesruptor_Impl *pDesruptor = new SfxItemDesruptor_Impl(pItem); - pDesruptor->LaunchDeleteOnIdle(); + new SfxItemDesruptor_Impl( pItem ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |