diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2020-09-18 11:03:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-09-18 14:05:37 +0200 |
commit | 92543758a7858dea4213a5557f4ec69c426f5235 (patch) | |
tree | ea23144367d1b1caa0188d07e3050f0130aadadd | |
parent | 5c2f5eac2e051773e0db7da9e82ba4b82e4256e8 (diff) |
wsd: mark these functions as static
So that it's more obvious that they don't even read the state of the
object.
Change-Id: I71d39bf3a20989c8fbf3410c2f1d2a98661c49d5
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/102986
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r-- | wsd/LOOLWSD.cpp | 14 | ||||
-rw-r--r-- | wsd/LOOLWSD.hpp | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp index 2e37618d3..9d89727ae 100644 --- a/wsd/LOOLWSD.cpp +++ b/wsd/LOOLWSD.cpp @@ -2264,7 +2264,7 @@ public: } /// Does this address feature in the allowed hosts list. - bool allowPostFrom(const std::string &address) + static bool allowPostFrom(const std::string &address) { static bool init = false; static Util::RegexListMatcher hosts; @@ -2627,7 +2627,7 @@ private: LOG_INF("Sent / response successfully."); } - void handleFaviconRequest(const RequestDetails &requestDetails, + static void handleFaviconRequest(const RequestDetails &requestDetails, const std::shared_ptr<StreamSocket>& socket) { assert(socket && "Must have a valid socket"); @@ -2701,7 +2701,7 @@ private: LOG_INF("Sent capabilities.json successfully."); } - void handleClipboardRequest(const Poco::Net::HTTPRequest& request, + static void handleClipboardRequest(const Poco::Net::HTTPRequest& request, Poco::MemoryInputStream& message, SocketDisposition &disposition, const std::shared_ptr<StreamSocket>& socket) @@ -2800,7 +2800,7 @@ private: } } - void handleRobotsTxtRequest(const Poco::Net::HTTPRequest& request, + static void handleRobotsTxtRequest(const Poco::Net::HTTPRequest& request, const std::shared_ptr<StreamSocket>& socket) { assert(socket && "Must have a valid socket"); @@ -3442,7 +3442,7 @@ private: } /// Lookup cached file content. - const std::string& getFileContent(const std::string& filename) + static const std::string& getFileContent(const std::string& filename) { const auto it = StaticFileContentCache.find(filename); if (it == StaticFileContentCache.end()) @@ -3650,7 +3650,7 @@ public: PrisonerPoll.insertNewSocket(findPrisonerServerPort()); } - void stopPrisoners() + static void stopPrisoners() { PrisonerPoll.joinThread(); } @@ -3774,7 +3774,7 @@ private: /// Create a new server socket - accepted sockets will be added /// to the @clientSockets' poll when created with @factory. - std::shared_ptr<ServerSocket> getServerSocket(ServerSocket::Type type, int port, + static std::shared_ptr<ServerSocket> getServerSocket(ServerSocket::Type type, int port, SocketPoll &clientSocket, const std::shared_ptr<SocketFactory>& factory) { diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp index 7f1e05a27..1b831e250 100644 --- a/wsd/LOOLWSD.hpp +++ b/wsd/LOOLWSD.hpp @@ -427,7 +427,7 @@ protected: int main(const std::vector<std::string>& args) override; /// Handle various global static destructors. - void cleanup(); + static void cleanup(); private: #if ENABLE_SSL |