diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 10:14:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-14 10:59:49 +0100 |
commit | e55d2a31260ac1eeb45468c7b8f077de5a93060a (patch) | |
tree | bf7837760f1764ae94482d2348e32305948f3cfc /sfx2 | |
parent | d9b9b6f74cf8ad7ce617521b479e836997479102 (diff) |
coverity#735849 Unchecked dynamic_cast
Change-Id: Ia8f6b24db5d83337d56599214d0acdb9b144cfc3
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/doc/objitem.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sfx2/source/doc/objitem.cxx b/sfx2/source/doc/objitem.cxx index 1b446c4d0ce7..20192a9c16e8 100644 --- a/sfx2/source/doc/objitem.cxx +++ b/sfx2/source/doc/objitem.cxx @@ -88,12 +88,10 @@ SfxObjectItem::SfxObjectItem( sal_uInt16 nWhichId, SfxShell *pSh ) bool SfxObjectItem::operator==( const SfxPoolItem &rItem ) const { - const SfxObjectItem *pOther = dynamic_cast<const SfxObjectItem*>( &rItem ); - return pOther->_pSh == _pSh; + const SfxObjectItem& rOther = dynamic_cast<const SfxObjectItem&>(rItem); + return rOther._pSh == _pSh; } - - SfxPoolItem* SfxObjectItem::Clone( SfxItemPool *) const { return new SfxObjectItem( Which(), _pSh ); |