[Libreoffice-commits] online.git: loolwsd/TileCache.cpp loolwsd/TileCache.hpp
Miklos Vajna
vmiklos at collabora.co.uk
Fri Apr 22 06:39:38 UTC 2016
loolwsd/TileCache.cpp | 4 ++--
loolwsd/TileCache.hpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
New commits:
commit 0833a99b37907e5c82251abc0d52b6120ed70d3a
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Fri Apr 22 08:38:59 2016 +0200
TileCache: avoid copying these for each invocation
Change-Id: Icaf84699d7f54f2f977162a040aed1f4090f680d
diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 996d5f3..f05ffa6 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -44,7 +44,7 @@ using Poco::URI;
using namespace LOOLProtocol;
-void TileBeingRendered::subscribe(std::weak_ptr<MasterProcessSession> session)
+void TileBeingRendered::subscribe(const std::weak_ptr<MasterProcessSession>& session)
{
_subscribers.push_back(session);
}
@@ -382,7 +382,7 @@ void TileCache::invalidateTiles(const std::string& tiles)
}
}
-void TileCache::removeFile(const std::string fileName)
+void TileCache::removeFile(const std::string& fileName)
{
Log::warn("Removing tile: " + fileName);
Util::removeFile(_persCacheDir + "/" + fileName);
diff --git a/loolwsd/TileCache.hpp b/loolwsd/TileCache.hpp
index 80c52be..cc4f746 100644
--- a/loolwsd/TileCache.hpp
+++ b/loolwsd/TileCache.hpp
@@ -35,7 +35,7 @@ class TileBeingRendered
std::vector<std::weak_ptr<MasterProcessSession>> _subscribers;
public:
- void subscribe(std::weak_ptr<MasterProcessSession> session);
+ void subscribe(const std::weak_ptr<MasterProcessSession>& session);
std::vector<std::weak_ptr<MasterProcessSession>> getSubscribers();
};
@@ -84,7 +84,7 @@ public:
void invalidateTiles(int part, int x, int y, int width, int height);
// Removes the given file from both editing and persistent cache
- void removeFile(const std::string fileName);
+ void removeFile(const std::string& fileName);
private:
/// Path of the (sub-)cache dir, the parameter specifies which (sub-)cache to use.
More information about the Libreoffice-commits
mailing list