[Libreoffice-commits] online.git: kit/ChildSession.cpp net/Ssl.hpp wsd/AdminModel.cpp wsd/AdminModel.hpp wsd/LOOLWSD.cpp wsd/TestStubs.cpp
Ashod Nakashian (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 1 05:40:31 UTC 2020
kit/ChildSession.cpp | 2 +-
net/Ssl.hpp | 1 +
wsd/AdminModel.cpp | 4 ++--
wsd/AdminModel.hpp | 12 +++++++-----
wsd/LOOLWSD.cpp | 2 +-
wsd/TestStubs.cpp | 2 +-
6 files changed, 13 insertions(+), 10 deletions(-)
New commits:
commit 02da27a4364b44ddb57936070d6b36a7d53d3498
Author: Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Wed Jun 3 10:43:52 2020 -0400
Commit: Ashod Nakashian <ashnakash at gmail.com>
CommitDate: Wed Jul 1 07:40:10 2020 +0200
wsd: improve readability
Change-Id: I2f85ebff783ebb799324b0aa95f5d0d023c19231
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/96381
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Tested-by: Jenkins
Reviewed-by: Ashod Nakashian <ashnakash at gmail.com>
diff --git a/kit/ChildSession.cpp b/kit/ChildSession.cpp
index cc8f7413e..6d6344cef 100644
--- a/kit/ChildSession.cpp
+++ b/kit/ChildSession.cpp
@@ -1643,7 +1643,7 @@ bool ChildSession::renderWindow(const char* /*buffer*/, int /*length*/, const St
bool ChildSession::resizeWindow(const char* /*buffer*/, int /*length*/, const StringVector& tokens)
{
- const unsigned winId = (tokens.size() > 1 ? std::stoul(tokens[1].c_str(), nullptr, 10) : 0);
+ const unsigned winId = (tokens.size() > 1 ? std::stoul(tokens[1], nullptr, 10) : 0);
getLOKitDocument()->setView(_viewId);
diff --git a/net/Ssl.hpp b/net/Ssl.hpp
index 25bcc318a..a5fd70a76 100644
--- a/net/Ssl.hpp
+++ b/net/Ssl.hpp
@@ -10,6 +10,7 @@
#pragma once
#include <atomic>
+#include <cassert>
#include <memory>
#include <mutex>
#include <string>
diff --git a/wsd/AdminModel.cpp b/wsd/AdminModel.cpp
index 893c7739a..415350b52 100644
--- a/wsd/AdminModel.cpp
+++ b/wsd/AdminModel.cpp
@@ -1019,10 +1019,10 @@ struct KitProcStats
void AdminModel::CalcDocAggregateStats(DocumentAggregateStats& stats)
{
for (auto& d : _documents)
- stats.Update(*d.second.get(), true);
+ stats.Update(*d.second, true);
for (auto& d : _expiredDocuments)
- stats.Update(*d.second.get(), false);
+ stats.Update(*d.second, false);
}
void CalcKitStats(KitProcStats& stats)
diff --git a/wsd/AdminModel.hpp b/wsd/AdminModel.hpp
index 43da0cd1d..d4a4513ce 100644
--- a/wsd/AdminModel.hpp
+++ b/wsd/AdminModel.hpp
@@ -9,15 +9,17 @@
#pragma once
+#include <cmath>
+#include <ctime>
+#include <list>
#include <memory>
#include <set>
#include <string>
-#include <cmath>
-#include <list>
+#include <utility>
-#include "Log.hpp"
-#include "net/WebSocketHandler.hpp"
+#include <common/Log.hpp>
#include "Util.hpp"
+#include "net/WebSocketHandler.hpp"
struct DocumentAggregateStats;
@@ -161,7 +163,7 @@ public:
fclose(_procSMaps);
}
- const std::string getDocKey() const { return _docKey; }
+ std::string getDocKey() const { return _docKey; }
pid_t getPid() const { return _pid; }
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6b1900443..5d3b17808 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -2412,7 +2412,7 @@ private:
throw Poco::FileAccessDeniedException("Admin console disabled");
try{
- if (!FileServerRequestHandler::isAdminLoggedIn(request, *response.get()))
+ if (!FileServerRequestHandler::isAdminLoggedIn(request, *response))
throw Poco::Net::NotAuthenticatedException("Invalid admin login");
}
catch (const Poco::Net::NotAuthenticatedException& exc)
diff --git a/wsd/TestStubs.cpp b/wsd/TestStubs.cpp
index ca04416da..ad0859a8e 100644
--- a/wsd/TestStubs.cpp
+++ b/wsd/TestStubs.cpp
@@ -23,7 +23,7 @@ void ClientSession::traceTileBySend(const TileDesc& /*tile*/, bool /*deduplicate
void ClientSession::enqueueSendMessage(const std::shared_ptr<Message>& /*data*/) {};
-ClientSession::~ClientSession() {}
+ClientSession::~ClientSession() = default;
void ClientSession::onDisconnect() {}
More information about the Libreoffice-commits
mailing list