summaryrefslogtreecommitdiff
path: root/cppuhelper/source/weak.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:13:11 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:21 +0100
commitbf3f8403029fcea9ce7d53078697efb24c09a75b (patch)
tree3f99977435c7794529d3975c798afceb86444deb /cppuhelper/source/weak.cxx
parent4730b58d9989512ed25790768ba78decfde7d667 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I62a63915dfc0bced2cd8ffe3999cbde5c4d97b0b
Diffstat (limited to 'cppuhelper/source/weak.cxx')
-rw-r--r--cppuhelper/source/weak.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index d0d8a11b58ae..a67f881ad54a 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -36,7 +36,7 @@ namespace cppu
// due to static Reflection destruction from usr, there must be a mutex leak (#73272#)
inline static Mutex & getWeakMutex()
{
- static Mutex * s_pMutex = 0;
+ static Mutex * s_pMutex = nullptr;
if (! s_pMutex)
s_pMutex = new Mutex();
return *s_pMutex;
@@ -209,9 +209,9 @@ void SAL_CALL OWeakObject::release() throw()
void OWeakObject::disposeWeakConnectionPoint()
{
OSL_PRECOND( m_refCount == 0, "OWeakObject::disposeWeakConnectionPoint: only to be called with a ref count of 0!" );
- if (m_pWeakConnectionPoint != 0) {
+ if (m_pWeakConnectionPoint != nullptr) {
OWeakConnectionPoint * const p = m_pWeakConnectionPoint;
- m_pWeakConnectionPoint = 0;
+ m_pWeakConnectionPoint = nullptr;
try {
p->dispose();
}
@@ -412,7 +412,7 @@ void SAL_CALL OWeakRefListener::dispose()
//-- WeakReferenceHelper ----------------------------------------------------------
WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt)
- : m_pImpl( 0 )
+ : m_pImpl( nullptr )
{
if (xInt.is())
{
@@ -422,7 +422,7 @@ WeakReferenceHelper::WeakReferenceHelper(const Reference< XInterface >& xInt)
}
WeakReferenceHelper::WeakReferenceHelper(const WeakReferenceHelper& rWeakRef)
- : m_pImpl( 0 )
+ : m_pImpl( nullptr )
{
Reference< XInterface > xInt( rWeakRef.get() );
if (xInt.is())
@@ -445,7 +445,7 @@ void WeakReferenceHelper::clear()
m_pImpl->m_XWeakConnectionPoint.clear();
}
m_pImpl->release();
- m_pImpl = 0;
+ m_pImpl = nullptr;
}
}
catch (RuntimeException &) { OSL_ASSERT( false ); } // assert here, but no unexpected()