diff options
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/inc/poolio.hxx | 5 | ||||
-rw-r--r-- | svl/source/items/itempool.cxx | 1 |
2 files changed, 4 insertions, 2 deletions
diff --git a/svl/source/inc/poolio.hxx b/svl/source/inc/poolio.hxx index 207dffded624..021b85924a65 100644 --- a/svl/source/inc/poolio.hxx +++ b/svl/source/inc/poolio.hxx @@ -61,7 +61,10 @@ public: o3tl::sorted_vector<SfxPoolItem*>::const_iterator find(SfxPoolItem* pItem) const { return maPoolItemSet.find(pItem); } void insert(SfxPoolItem* pItem) { - maPoolItemSet.insert(pItem); + bool bInserted = maPoolItemSet.insert(pItem).second; + assert( bInserted && "duplicate item?" ); + (void)bInserted; + if (pItem->IsSortable()) { // bail early if someone modified one of these things underneath me diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx index 70809ac65ad4..82668c909a35 100644 --- a/svl/source/items/itempool.cxx +++ b/svl/source/items/itempool.cxx @@ -680,7 +680,6 @@ const SfxPoolItem& SfxItemPool::PutImpl( const SfxPoolItem& rItem, sal_uInt16 nW AddRef( *pNewItem ); // 4. finally insert into the pointer array - assert( rItemArr.find(pNewItem) == rItemArr.end() ); rItemArr.insert( pNewItem ); return *pNewItem; } |