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

New commits:
commit 874b86ac89e0a6cd456d5dca6dda312ab584d322
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/36764
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/wsd/DocumentBroker.cpp b/wsd/DocumentBroker.cpp
index 9cd27989..999cab12 100644
--- a/wsd/DocumentBroker.cpp
+++ b/wsd/DocumentBroker.cpp
@@ -244,14 +244,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