[Libreoffice-commits] core.git: vcl/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Mon Apr 29 09:29:41 UTC 2019


 vcl/source/app/svdata.cxx |   15 +++------------
 1 file changed, 3 insertions(+), 12 deletions(-)

New commits:
commit 60e7bf52450aaa20aa3ad9f10d32db590879e8c2
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Mon Apr 29 09:29:12 2019 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Apr 29 11:28:49 2019 +0200

    clean up iterator code in SystemDependentDataBuffer
    
    Change-Id: I5f0cd0884b6490ae3018de13e3508b76e201d55f
    Reviewed-on: https://gerrit.libreoffice.org/71507
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx
index 5613e8aa7b73..93335d48624b 100644
--- a/vcl/source/app/svdata.cxx
+++ b/vcl/source/app/svdata.cxx
@@ -115,8 +115,7 @@ namespace
     public:
         SystemDependentDataBuffer(const sal_Char* pDebugName)
         :   basegfx::SystemDependentDataManager(),
-            maTimer(std::make_unique<AutoTimer>(pDebugName)),
-            maEntries()
+            maTimer(std::make_unique<AutoTimer>(pDebugName))
         {
             maTimer->SetTimeout(1000);
             maTimer->SetInvokeHandler(LINK(this, SystemDependentDataBuffer, implTimeoutHdl));
@@ -168,7 +167,6 @@ namespace
         void flushAll() override
         {
             ::osl::MutexGuard aGuard(m_aMutex);
-            EntryMap::iterator aIter(maEntries.begin());
 
             if(maTimer)
             {
@@ -176,12 +174,7 @@ namespace
                 maTimer.reset();
             }
 
-            while(aIter != maEntries.end())
-            {
-                EntryMap::iterator aDelete(aIter);
-                ++aIter;
-                maEntries.erase(aDelete);
-            }
+            maEntries.clear();
         }
     };
 
@@ -199,9 +192,7 @@ namespace
             }
             else
             {
-                EntryMap::iterator aDelete(aIter);
-                ++aIter;
-                maEntries.erase(aDelete);
+                aIter = maEntries.erase(aIter);
             }
         }
 


More information about the Libreoffice-commits mailing list