diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-07 16:00:31 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-04-08 05:32:56 +0200 |
commit | f3fc127dc007f32355859ae4fc7d34916c500a18 (patch) | |
tree | 799ee5af2c1a31c6c2243444caa932a6b2520e1b /sfx2 | |
parent | 817e3447053d1a7465a5cf547b4eb39fc46b4d59 (diff) |
Use osl_atomic_increment/osl_atomic_decrement to change m_refCount
Change-Id: Ia24441d3671102fdeeb797547396c25ee2a6ffd3
Reviewed-on: https://gerrit.libreoffice.org/70382
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/notify/globalevents.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/notify/globalevents.cxx b/sfx2/source/notify/globalevents.cxx index 6dd0340eb22d..cf15a8b7ff09 100644 --- a/sfx2/source/notify/globalevents.cxx +++ b/sfx2/source/notify/globalevents.cxx @@ -143,10 +143,10 @@ SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const uno::Reference < uno::XCompone , m_aLegacyListeners (m_aLock) , m_aDocumentListeners (m_aLock) { - m_refCount++; + osl_atomic_increment(&m_refCount); SfxApplication::GetOrCreate(); m_xEvents = new GlobalEventConfig(); - m_refCount--; + osl_atomic_decrement(&m_refCount); } uno::Reference< container::XNameReplace > SAL_CALL SfxGlobalEvents_Impl::getEvents() diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 35411929ef53..8647dd7ea686 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -181,12 +181,12 @@ public: , pWorkWindow( pWork ) , _nStartTime(0) { - ++m_refCount; + osl_atomic_increment(&m_refCount); Reference< lang::XComponent > xComponent( static_cast< ::cppu::OWeakObject* >(pController), uno::UNO_QUERY ); if (xComponent.is()) xComponent->addEventListener(this); - --m_refCount; + osl_atomic_decrement(&m_refCount); } virtual void SAL_CALL start(const OUString& aText, sal_Int32 nRange) override; |