summaryrefslogtreecommitdiff
path: root/linguistic
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 /linguistic
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 'linguistic')
-rw-r--r--linguistic/source/hyphdsp.cxx3
-rw-r--r--linguistic/source/iprcache.cxx3
-rw-r--r--linguistic/source/thesdsp.cxx3
3 files changed, 3 insertions, 6 deletions
diff --git a/linguistic/source/hyphdsp.cxx b/linguistic/source/hyphdsp.cxx
index be33885880d3..fe9906a260a6 100644
--- a/linguistic/source/hyphdsp.cxx
+++ b/linguistic/source/hyphdsp.cxx
@@ -65,8 +65,7 @@ HyphenatorDispatcher::~HyphenatorDispatcher()
void HyphenatorDispatcher::ClearSvcList()
{
// release memory for each table entry
- HyphSvcByLangMap_t aTmp;
- aSvcMap.swap( aTmp );
+ HyphSvcByLangMap_t().swap(aSvcMap);
}
diff --git a/linguistic/source/iprcache.cxx b/linguistic/source/iprcache.cxx
index 14eee1dfc69b..cf9c4db0b266 100644
--- a/linguistic/source/iprcache.cxx
+++ b/linguistic/source/iprcache.cxx
@@ -201,8 +201,7 @@ void SpellCache::Flush()
{
MutexGuard aGuard( GetLinguMutex() );
// clear word list
- LangWordList_t aEmpty;
- aWordLists.swap( aEmpty );
+ LangWordList_t().swap(aWordLists);
}
bool SpellCache::CheckWord( const OUString& rWord, LanguageType nLang )
diff --git a/linguistic/source/thesdsp.cxx b/linguistic/source/thesdsp.cxx
index 284673d641a7..2ffe3642e324 100644
--- a/linguistic/source/thesdsp.cxx
+++ b/linguistic/source/thesdsp.cxx
@@ -65,8 +65,7 @@ ThesaurusDispatcher::~ThesaurusDispatcher()
void ThesaurusDispatcher::ClearSvcList()
{
// release memory for each table entry
- ThesSvcByLangMap_t aTmp;
- aSvcMap.swap( aTmp );
+ ThesSvcByLangMap_t().swap(aSvcMap);
}