summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-10-28 21:22:24 +0200
committerMichael Stahl <mstahl@redhat.com>2016-10-28 22:49:28 +0200
commit855e69d37eec08efdf9952ec3fb5424cf69e9f54 (patch)
tree03ea085da1382b0e2fbf0c570fe094c52b48c2ba /include
parent3d456dfa6637c6c3ebe7a21f1f1a5b05039cee2a (diff)
svl: SfxPoolItem reference counting assertions
Change-Id: Ice2ec9a4592a1fad36913ae7d089aa8c63dfc669
Diffstat (limited to 'include')
-rw-r--r--include/svl/poolitem.hxx8
1 files changed, 4 insertions, 4 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;
}