summaryrefslogtreecommitdiff
path: root/dbaccess/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 /dbaccess/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 'dbaccess/source')
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index c37994d7c0ba..6b4ab7f15ba7 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -276,7 +276,8 @@ void ODatabaseContext::disposing()
// dispose the data sources
// disposing seems to remove elements, so work on copy for valid iterators
- ObjectCache objCopy(m_aDatabaseObjects);
+ ObjectCache objCopy;
+ objCopy.swap(m_aDatabaseObjects);
for (auto const& elem : objCopy)
{
rtl::Reference< ODatabaseModelImpl > obj(elem.second);
@@ -284,7 +285,6 @@ void ODatabaseContext::disposing()
// dispose()
obj->dispose();
}
- m_aDatabaseObjects.clear();
}
// XNamingService