Kaydet (Commit) abd8e764 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

-Werror,-Wtautological-undefined-compare

("reference cannot be bound to dereferenced null pointer in well-defined C++
code; comparison may be assumed to always evaluate to true")

Change-Id: I41660cb5e9a14a5c0694259f0244c789ce3d4753
üst 0816b00d
......@@ -636,10 +636,6 @@ void SfxItemPool::ResetPoolDefaultItem( sal_uInt16 nWhichId )
const SfxPoolItem& SfxItemPool::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
"SetItem without ItemSet" );
if ( 0 == nWhich )
nWhich = rItem.Which();
......@@ -792,10 +788,6 @@ void SfxPoolItemArray_Impl::ReHash()
void SfxItemPool::Remove( const SfxPoolItem& rItem )
{
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
"SetItem without ItemSet" );
SFX_ASSERT( !IsPoolDefaultItem(&rItem), rItem.Which(),
"where's the Pool Default coming from here?" );
......
......@@ -482,12 +482,6 @@ SfxItemState SfxItemSet::GetItemState( sal_uInt16 nWhich,
if (ppItem)
{
#ifdef DBG_UTIL
const SfxPoolItem *pItem = *ppFnd;
DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
0 != &((const SfxSetItem*)pItem)->GetItemSet(),
"SetItem without ItemSet" );
#endif
*ppItem = *ppFnd;
}
return SFX_ITEM_SET;
......@@ -512,9 +506,6 @@ bool SfxItemSet::HasItem(sal_uInt16 nWhich, const SfxPoolItem** ppItem) const
const SfxPoolItem* SfxItemSet::Put( const SfxPoolItem& rItem, sal_uInt16 nWhich )
{
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
"SetItem without ItemSet" );
if ( !nWhich )
return 0; //FIXME: Only because of Outliner bug
......@@ -936,9 +927,6 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
}
#ifdef DBG_UTIL
const SfxPoolItem *pItem = *ppFnd;
DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
0 != &((const SfxSetItem*)pItem)->GetItemSet(),
"SetItem without ItemSet" );
if ( pItem->ISA(SfxVoidItem) || !pItem->Which() )
DBG_WARNING( "SFX_WARNING: Getting disabled Item" );
#endif
......@@ -958,9 +946,6 @@ const SfxPoolItem& SfxItemSet::Get( sal_uInt16 nWhich, bool bSrchInParent) const
// Get the Default from the Pool and return
SFX_ASSERT(_pPool, nWhich, "no Pool, but status is ambiguous");
const SfxPoolItem *pItem = &_pPool->GetDefaultItem( nWhich );
DBG_ASSERT( !pItem->ISA(SfxSetItem) ||
0 != &((const SfxSetItem*)pItem)->GetItemSet(),
"SetItem without ItemSet" );
return *pItem;
}
......
......@@ -326,13 +326,6 @@ void SfxItemPool::LoadCompleted()
{
if (*ppHtArr)
{
#ifdef DBG_UTIL
const SfxPoolItem &rItem = **ppHtArr;
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
"SetItem without ItemSet" );
#endif
if ( !ReleaseRef( **ppHtArr, 1 ) )
DELETEZ( *ppHtArr );
}
......@@ -488,13 +481,7 @@ SvStream &SfxItemPool::Load(SvStream &rStream)
for( size_t n = (*itrItemArr)->size(); n; --n, ++ppHtArr )
if (*ppHtArr)
{
#ifdef DBG_UTIL
const SfxPoolItem &rItem = **ppHtArr;
DBG_ASSERT( !rItem.ISA(SfxSetItem) ||
0 != &((const SfxSetItem&)rItem).GetItemSet(),
"SetItem without ItemSet" );
DBG_WARNING( "loading non-empty ItemPool" );
#endif
AddRef( **ppHtArr, 1 );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment