[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - wsd/DocumentBroker.cpp

Ashod Nakashian ashod.nakashian at collabora.co.uk
Fri May 19 08:30:11 UTC 2017


 wsd/DocumentBroker.cpp |   10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit 1eb3509c40c4c1601b963daf3c44f3bb781c3658
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
Date:   Thu Apr 20 23:50:03 2017 -0400

    wsd: simplify
    
    Change-Id: I7a16d82d8e9ebb120950fc1d0227ffdbe962d8e8
    Reviewed-on: https://gerrit.libreoffice.org/36769
    Reviewed-by: Jan Holesovsky <kendy at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 2c66154e..5b6fb3c7 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -245,14 +245,10 @@ void DocumentBroker::pollThread()
 
             // First copy into local container, since removeSession
             // will erase from _sessions, but will leave the last.
-            std::vector<std::shared_ptr<ClientSession>> sessions;
-            for (const auto& pair : _sessions)
-            {
-                sessions.push_back(pair.second);
-            }
-
-            for (const std::shared_ptr<ClientSession>& session : sessions)
+            std::map<std::string, std::shared_ptr<ClientSession>> sessions = _sessions;
+            for (const auto& pair : sessions)
             {
+                std::shared_ptr<ClientSession> session = pair.second;
                 try
                 {
                     // Notify the client and disconnect.


More information about the Libreoffice-commits mailing list