[Libreoffice-commits] online.git: common/Unit.hpp common/Util.hpp wsd/FileServer.hpp wsd/LOOLWSD.hpp wsd/TileCache.cpp wsd/TileCache.hpp wsd/TraceFile.hpp
Noel Grandin
noel.grandin at collabora.co.uk
Tue Dec 27 10:34:38 UTC 2016
common/Unit.hpp | 2 +-
common/Util.hpp | 2 +-
wsd/FileServer.hpp | 4 ++--
wsd/LOOLWSD.hpp | 2 +-
wsd/TileCache.cpp | 4 ++--
wsd/TileCache.hpp | 6 +++---
wsd/TraceFile.hpp | 2 +-
7 files changed, 11 insertions(+), 11 deletions(-)
New commits:
commit 6c0022fb100af8390da9f949c6e3118379eb6a48
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri Dec 23 08:42:35 2016 +0200
loplugin:staticmethods
Change-Id: Idf9596cfbbd6eef77e6271a1108d64dae864ed27
Reviewed-on: https://gerrit.libreoffice.org/32366
Reviewed-by: Tor Lillqvist <tml at collabora.com>
Tested-by: Tor Lillqvist <tml at collabora.com>
diff --git a/common/Unit.hpp b/common/Unit.hpp
index eb004c6..73c3fb4 100644
--- a/common/Unit.hpp
+++ b/common/Unit.hpp
@@ -137,7 +137,7 @@ public:
Prisoner
};
/// Simulate an incoming request
- void testHandleRequest(TestRequest type,
+ static void testHandleRequest(TestRequest type,
UnitHTTPServerRequest& request,
UnitHTTPServerResponse& response);
/// Do we have hooks for the Kit too
diff --git a/common/Util.hpp b/common/Util.hpp
index 58a33e2..c439203 100644
--- a/common/Util.hpp
+++ b/common/Util.hpp
@@ -237,7 +237,7 @@ namespace Util
}
private:
- bool match(const std::set<std::string>& set, const std::string& subject) const
+ static bool match(const std::set<std::string>& set, const std::string& subject)
{
if (set.find(subject) != set.end())
{
diff --git a/wsd/FileServer.hpp b/wsd/FileServer.hpp
index afa89fc..a9f56cd 100644
--- a/wsd/FileServer.hpp
+++ b/wsd/FileServer.hpp
@@ -21,9 +21,9 @@
/// Handles file requests over HTTP(S).
class FileServerRequestHandler : public Poco::Net::HTTPRequestHandler
{
- std::string getRequestPathname(const Poco::Net::HTTPServerRequest& request);
+ static std::string getRequestPathname(const Poco::Net::HTTPServerRequest& request);
- void preprocessFile(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response) throw(Poco::FileAccessDeniedException);
+ static void preprocessFile(Poco::Net::HTTPServerRequest& request, Poco::Net::HTTPServerResponse& response) throw(Poco::FileAccessDeniedException);
public:
/// Evaluate if the cookie exists, and if not, ask for the credentials.
diff --git a/wsd/LOOLWSD.hpp b/wsd/LOOLWSD.hpp
index 96edd96..f3e2aa3 100644
--- a/wsd/LOOLWSD.hpp
+++ b/wsd/LOOLWSD.hpp
@@ -84,7 +84,7 @@ private:
void initializeSSL();
void displayHelp();
- Poco::Process::PID createForKit();
+ static Poco::Process::PID createForKit();
class ConfigValueGetter
{
diff --git a/wsd/TileCache.cpp b/wsd/TileCache.cpp
index 36ceead..0ee368f 100644
--- a/wsd/TileCache.cpp
+++ b/wsd/TileCache.cpp
@@ -385,12 +385,12 @@ std::string TileCache::cacheFileName(const TileDesc& tile)
return oss.str();
}
-bool TileCache::parseCacheFileName(const std::string& fileName, int& part, int& width, int& height, int& tilePosX, int& tilePosY, int& tileWidth, int& tileHeight) const
+bool TileCache::parseCacheFileName(const std::string& fileName, int& part, int& width, int& height, int& tilePosX, int& tilePosY, int& tileWidth, int& tileHeight)
{
return (std::sscanf(fileName.c_str(), "%d_%dx%d.%d,%d.%dx%d.png", &part, &width, &height, &tilePosX, &tilePosY, &tileWidth, &tileHeight) == 7);
}
-bool TileCache::intersectsTile(const std::string& fileName, int part, int x, int y, int width, int height) const
+bool TileCache::intersectsTile(const std::string& fileName, int part, int x, int y, int width, int height)
{
int tilePart, tilePixelWidth, tilePixelHeight, tilePosX, tilePosY, tileWidth, tileHeight;
if (parseCacheFileName(fileName, tilePart, tilePixelWidth, tilePixelHeight, tilePosX, tilePosY, tileWidth, tileHeight))
diff --git a/wsd/TileCache.hpp b/wsd/TileCache.hpp
index b9b2f60..af9b8f2 100644
--- a/wsd/TileCache.hpp
+++ b/wsd/TileCache.hpp
@@ -79,11 +79,11 @@ private:
// Removes the given file from the cache
void removeFile(const std::string& fileName);
- std::string cacheFileName(const TileDesc& tile);
- bool parseCacheFileName(const std::string& fileName, int& part, int& width, int& height, int& tilePosX, int& tilePosY, int& tileWidth, int& tileHeight) const;
+ static std::string cacheFileName(const TileDesc& tile);
+ static bool parseCacheFileName(const std::string& fileName, int& part, int& width, int& height, int& tilePosX, int& tilePosY, int& tileWidth, int& tileHeight);
/// Extract location from fileName, and check if it intersects with [x, y, width, height].
- bool intersectsTile(const std::string& fileName, int part, int x, int y, int width, int height) const;
+ static bool intersectsTile(const std::string& fileName, int part, int x, int y, int width, int height);
/// Load the timestamp from modtime.txt.
Poco::Timestamp getLastModified();
diff --git a/wsd/TraceFile.hpp b/wsd/TraceFile.hpp
index 2662dbc..f6c87b7 100644
--- a/wsd/TraceFile.hpp
+++ b/wsd/TraceFile.hpp
@@ -265,7 +265,7 @@ private:
_epochStart = _records[0].TimestampNs;
}
- std::vector<std::string> split(const std::string& s, const char delim) const
+ static std::vector<std::string> split(const std::string& s, const char delim)
{
std::stringstream ss(s);
std::string item;
More information about the Libreoffice-commits
mailing list