summaryrefslogtreecommitdiff
path: root/svtools/source
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-02-07 21:07:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-08 11:23:19 +0100
commit87030862d4750b456f876dc48310d87ed48848f0 (patch)
treed7ff2dc74aea78648a762e9b5dfe71a192fccf1a /svtools/source
parent5088e6d34b0ffba423f8633ee83673a9c1d40036 (diff)
replace some more copy/clear with swap
Change-Id: I6501dd59682d2605e9b9856c2deaa02a873ce641 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88239 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svtools/source')
-rw-r--r--svtools/source/control/valueacc.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/svtools/source/control/valueacc.cxx b/svtools/source/control/valueacc.cxx
index 0b1e412ea3f4..e205a937429b 100644
--- a/svtools/source/control/valueacc.cxx
+++ b/svtools/source/control/valueacc.cxx
@@ -619,8 +619,7 @@ void SAL_CALL ValueSetAcc::disposing()
// Make a copy of the list and clear the original.
const SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard (m_aMutex);
- aListenerListCopy = mxEventListeners;
- mxEventListeners.clear();
+ aListenerListCopy.swap(mxEventListeners);
// Reset the pointer to the parent. It has to be the one who has
// disposed us because he is dying.
@@ -1943,8 +1942,7 @@ void SAL_CALL SvtValueSetAcc::disposing()
// Make a copy of the list and clear the original.
const SolarMutexGuard aSolarGuard;
::osl::MutexGuard aGuard (m_aMutex);
- aListenerListCopy = mxEventListeners;
- mxEventListeners.clear();
+ aListenerListCopy.swap(mxEventListeners);
// Reset the pointer to the parent. It has to be the one who has
// disposed us because he is dying.