diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-21 16:28:33 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-01-24 08:36:24 +0100 |
commit | 654c5272299057681d295afb76fc984b20868c7c (patch) | |
tree | 3deb7bb0b8b787f90ae5b95b59f41d9debcbc8ba /include/o3tl | |
parent | sc: GetRowForHeight performance improvement. (diff) | |
download | core-654c5272299057681d295afb76fc984b20868c7c.tar.gz core-654c5272299057681d295afb76fc984b20868c7c.zip |
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 'include/o3tl')
-rw-r--r-- | include/o3tl/lru_map.hxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/o3tl/lru_map.hxx b/include/o3tl/lru_map.hxx index ce5a078bc352..dc8a102977dd 100644 --- a/include/o3tl/lru_map.hxx +++ b/include/o3tl/lru_map.hxx @@ -77,8 +77,7 @@ public: // Some code .e.g. SalBitmap likes to remove itself from a cache during it's destructor, which means we // get calls into lru_map while we are in destruction, so use the swap-and-clear idiom to avoid those problems. mLruMap.clear(); - list_t aLruListTemp; - aLruListTemp.swap(mLruList); + list_t().swap(mLruList); } void insert(key_value_pair_t& rPair) |