summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svl/poolitem.hxx8
-rw-r--r--svl/source/items/poolitem.cxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/include/svl/poolitem.hxx b/include/svl/poolitem.hxx
index cf7c96ec65ba..cbc60a952c5c 100644
--- a/include/svl/poolitem.hxx
+++ b/include/svl/poolitem.hxx
@@ -192,15 +192,15 @@ inline void SfxPoolItem::SetKind( SfxItemKind n )
inline void SfxPoolItem::AddRef( sal_uLong n ) const
{
- DBG_ASSERT(m_nRefCount <= SFX_ITEMS_MAXREF, "AddRef with non-Pool-Item");
- DBG_ASSERT(ULONG_MAX - m_nRefCount > n, "AddRef: refcount overflow");
+ assert(m_nRefCount <= SFX_ITEMS_MAXREF && "AddRef with non-Pool-Item");
+ assert(n <= SFX_ITEMS_MAXREF - m_nRefCount && "AddRef: refcount overflow");
m_nRefCount += n;
}
inline sal_uLong SfxPoolItem::ReleaseRef( sal_uLong n ) const
{
- DBG_ASSERT(m_nRefCount <= SFX_ITEMS_MAXREF, "ReleaseRef with non-Pool-Item");
- DBG_ASSERT(m_nRefCount >= n, "ReleaseRef: refcount underflow");
+ assert(m_nRefCount <= SFX_ITEMS_MAXREF && "ReleaseRef with non-Pool-Item");
+ assert(n <= m_nRefCount);
m_nRefCount -= n;
return m_nRefCount;
}
diff --git a/svl/source/items/poolitem.cxx b/svl/source/items/poolitem.cxx
index 0032ac6c5ad0..a1afa3407f4c 100644
--- a/svl/source/items/poolitem.cxx
+++ b/svl/source/items/poolitem.cxx
@@ -110,8 +110,8 @@ SfxPoolItem::SfxPoolItem( const SfxPoolItem& rCpy )
SfxPoolItem::~SfxPoolItem()
{
- DBG_ASSERT(m_nRefCount == 0 || m_nRefCount > SFX_ITEMS_MAXREF,
- "destroying item in use");
+ assert((m_nRefCount == 0 || m_nRefCount > SFX_ITEMS_MAXREF)
+ && "destroying item in use");
#if OSL_DEBUG_LEVEL > 0
--nItemCount;
#endif