summaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-01-21 16:28:33 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-01-24 08:36:24 +0100
commit654c5272299057681d295afb76fc984b20868c7c (patch)
tree3deb7bb0b8b787f90ae5b95b59f41d9debcbc8ba /extensions
parentb35f6971561bc095965e82f230e0307f6694228b (diff)
Use ContainerType().swap and avoid local variables
Change-Id: I773555180758a97aff37f9bc27de83c355d71521 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'extensions')
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx6
-rw-r--r--extensions/source/propctrlr/pcrcommon.hxx3
2 files changed, 3 insertions, 6 deletions
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index 4ec979682aea..f20107448ccb 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -462,8 +462,7 @@ namespace pcr
m_xComponent.set( _rxIntrospectee, UNO_QUERY_THROW );
m_bEventsMapInitialized = false;
- EventMap aEmpty;
- m_aEvents.swap( aEmpty );
+ EventMap().swap(m_aEvents);
m_bIsDialogElement = false;
m_nGridColumnType = -1;
@@ -824,8 +823,7 @@ namespace pcr
void SAL_CALL EventHandler::disposing()
{
- EventMap aEmpty;
- m_aEvents.swap( aEmpty );
+ EventMap().swap(m_aEvents);
m_xComponent.clear();
}
diff --git a/extensions/source/propctrlr/pcrcommon.hxx b/extensions/source/propctrlr/pcrcommon.hxx
index 4544ba244c4c..ccaa39136a15 100644
--- a/extensions/source/propctrlr/pcrcommon.hxx
+++ b/extensions/source/propctrlr/pcrcommon.hxx
@@ -58,8 +58,7 @@ namespace pcr
template< class CONTAINER >
void clearContainer( CONTAINER& _rContainer )
{
- CONTAINER aEmpty;
- _rContainer.swap( aEmpty );
+ CONTAINER().swap(_rContainer);
}