diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-07-23 15:18:02 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-07-23 15:18:02 +0200 |
commit | a4967e4a7563e1d1bd43d1560ed95b9f6bbf58cd (patch) | |
tree | 0e2c0e9218589d4f872ec9f3fcabb9e02627eb78 /cppu | |
parent | 682cb83ed59233decbeeaff68c4d871442b58bb1 (diff) |
Assertion clean-up
Change-Id: I234c615d9d3386da2b244709add5c029b76d346c
Diffstat (limited to 'cppu')
-rw-r--r-- | cppu/source/uno/lbenv.cxx | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx index ef37aee9619e..3358fe971e7f 100644 --- a/cppu/source/uno/lbenv.cxx +++ b/cppu/source/uno/lbenv.cxx @@ -187,17 +187,14 @@ inline void ObjectEntry::append( typelib_typedescription_acquire( (typelib_TypeDescription *) pTypeDescr ); aNewEntry.pTypeDescr = pTypeDescr; - ::std::pair< Ptr2ObjectMap::iterator, bool > insertion( + ::std::pair< Ptr2ObjectMap::iterator, bool > i( pEnv->aPtr2ObjectMap.insert( Ptr2ObjectMap::value_type( pInterface, this ) ) ); - // No idea if the code above has side-effects and can't be just - // bypassed in the no-OSL_ASSERT case, so avoid "unused variable" like this instead. - (void) insertion; - - OSL_ASSERT( insertion.second || - (find( pInterface, 0 ) >= 0 && - // points to the same object entry: - insertion.first->second == this) ); + SAL_WARN_IF( + !i.second && (find(pInterface, 0) == -1 || i.first->second != this), + "cppu", + "map already contains " << i.first->second << " != " << this << " for " + << pInterface); aInterfaces.push_back( aNewEntry ); } |