swunolocking1: #i108161#: WeakReferenceHelper::operator=():
avoid creating a temporary WeakReferenceHelper for uno::Reference assignment. [according to callgrind this is 3 times faster]
This commit is contained in:
@@ -383,4 +383,5 @@ UDK_3.6 { # OOo 3.0
|
||||
UDK_3.7 { # OOo 3.3
|
||||
global:
|
||||
__1cEcppuLOWeakObjectbAdisposeWeakConnectionPoint6M_v_;
|
||||
__1cDcomDsunEstarDunoTWeakReferenceHelper2G6Mrkn0DJReference4n0DKXInterface____r4_;
|
||||
} UDK_3.6;
|
||||
|
@@ -377,5 +377,6 @@ UDK_3.5 { # OOo 3.0
|
||||
UDK_3.6 { # OOo 3.3
|
||||
global:
|
||||
_ZN4cppu11OWeakObject26disposeWeakConnectionPointEv;
|
||||
_ZN3com3sun4star3uno19WeakReferenceHelperaSERKNS2_9ReferenceINS2_10XInterfaceEEE;
|
||||
} UDK_3.5;
|
||||
|
||||
|
@@ -480,12 +480,21 @@ WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef) SA
|
||||
}
|
||||
|
||||
WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& rWeakRef) SAL_THROW( () )
|
||||
{
|
||||
if (this == &rWeakRef)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
Reference< XInterface > xInt( rWeakRef.get() );
|
||||
return operator = ( xInt );
|
||||
}
|
||||
|
||||
WeakReferenceHelper & SAL_CALL
|
||||
WeakReferenceHelper::operator= (const Reference< XInterface > & xInt)
|
||||
SAL_THROW( () )
|
||||
{
|
||||
try
|
||||
{
|
||||
if (this != &rWeakRef)
|
||||
{
|
||||
Reference< XInterface > xInt( rWeakRef.get() );
|
||||
if (m_pImpl)
|
||||
{
|
||||
if (m_pImpl->m_XWeakConnectionPoint.is())
|
||||
@@ -502,7 +511,6 @@ WeakReferenceHelper& WeakReferenceHelper::operator=(const WeakReferenceHelper& r
|
||||
m_pImpl->acquire();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (RuntimeException &) { OSL_ASSERT( 0 ); } // assert here, but no unexpected()
|
||||
return *this;
|
||||
}
|
||||
|
Reference in New Issue
Block a user