common/MessageQueue.cpp | 6 ++++-- kit/Kit.cpp | 3 ++- test/httpwserror.cpp | 4 ++-- 3 files changed, 8 insertions(+), 5 deletions(-)
New commits: commit 1ba7c0209af2c02620e7c7ae25994160d2e3b812 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> Date: Sun Jan 29 16:29:18 2017 -0500 wsd: cosmetics Change-Id: I58a9e579e228d7b4a1e1b5686988aeff8da9922f Reviewed-on: https://gerrit.libreoffice.org/33674 Reviewed-by: Ashod Nakashian <ashnak...@gmail.com> Tested-by: Ashod Nakashian <ashnak...@gmail.com> diff --git a/common/MessageQueue.cpp b/common/MessageQueue.cpp index 5bf489d..65a51a2 100644 --- a/common/MessageQueue.cpp +++ b/common/MessageQueue.cpp @@ -80,10 +80,12 @@ void TileQueue::put_impl(const Payload& value) } else if (firstToken == "callback") { - std::string newMsg = removeCallbackDuplicate(msg); + const std::string newMsg = removeCallbackDuplicate(msg); if (newMsg.empty()) + { MessageQueue::put_impl(value); + } else { MessageQueue::put_impl(Payload(newMsg.data(), newMsg.data() + newMsg.size())); @@ -341,7 +343,7 @@ std::string TileQueue::removeCallbackDuplicate(const std::string& callbackMsg) callbackType == "26" || // the view cell cursor has moved callbackType == "28") // the view cursor visibility has changed { - bool isViewCallback = (callbackType == "24" || callbackType == "26" || callbackType == "28"); + const bool isViewCallback = (callbackType == "24" || callbackType == "26" || callbackType == "28"); std::string viewId; if (isViewCallback) diff --git a/kit/Kit.cpp b/kit/Kit.cpp index 4401a6c..e093d0b 100644 --- a/kit/Kit.cpp +++ b/kit/Kit.cpp @@ -1050,7 +1050,7 @@ private: // and create an array of JSON objects containing id and username Array::Ptr viewInfoArray = new Array(); int arrayIndex = 0; - for (auto& viewId: viewIds) + for (const auto& viewId : viewIds) { Object::Ptr viewInfoObj = new Object(); viewInfoObj->set("id", viewId); @@ -1069,6 +1069,7 @@ private: color = viewColorsMap[viewInfoMap[viewId].username]; } } + viewInfoObj->set("color", color); viewInfoArray->set(arrayIndex++, viewInfoObj); diff --git a/test/httpwserror.cpp b/test/httpwserror.cpp index bd31291..91a783b 100644 --- a/test/httpwserror.cpp +++ b/test/httpwserror.cpp @@ -184,7 +184,7 @@ void HTTPWSError::testMaxConnections() getDocumentPathAndURL("empty.odt", docPath, docURL, testname); Poco::Net::HTTPRequest request(Poco::Net::HTTPRequest::HTTP_GET, docURL); auto socket = loadDocAndGetSocket(_uri, docURL, testname); - std::cerr << "Opened connect #1 of " << MAX_CONNECTIONS << std::endl; + std::cerr << "Opened connection #1 of " << MAX_CONNECTIONS << std::endl; std::vector<std::shared_ptr<LOOLWebSocket>> views; for (int it = 1; it < MAX_CONNECTIONS; ++it) @@ -192,7 +192,7 @@ void HTTPWSError::testMaxConnections() std::unique_ptr<Poco::Net::HTTPClientSession> session(createSession(_uri)); auto ws = std::make_shared<LOOLWebSocket>(*session, request, _response); views.emplace_back(ws); - std::cerr << "Opened connect #" << (it+1) << " of " << MAX_CONNECTIONS << std::endl; + std::cerr << "Opened connection #" << (it+1) << " of " << MAX_CONNECTIONS << std::endl; } std::cerr << "Opening one more connection beyond the limit." << std::endl; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits