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

New commits:
commit 1eb3509c40c4c1601b963daf3c44f3bb781c3658
Author: Ashod Nakashian <ashod.nakash...@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 <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to