loolwsd/TileCache.cpp |    4 ++--
 loolwsd/TileCache.hpp |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit b72c777f859dfb9b09e1fe7c6958713d28dd2380
Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk>
Date:   Wed Sep 21 18:29:08 2016 -0400

    loolwsd: const members where possible
    
    Change-Id: I318a76ad9e0c0ca334eb9239b61e674ce9a6a596
    Reviewed-on: https://gerrit.libreoffice.org/29162
    Reviewed-by: Ashod Nakashian <ashnak...@gmail.com>
    Tested-by: Ashod Nakashian <ashnak...@gmail.com>

diff --git a/loolwsd/TileCache.cpp b/loolwsd/TileCache.cpp
index 88ccaf5..4b2ac2d 100644
--- a/loolwsd/TileCache.cpp
+++ b/loolwsd/TileCache.cpp
@@ -364,12 +364,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)
+bool TileCache::parseCacheFileName(const std::string& fileName, int& part, 
int& width, int& height, int& tilePosX, int& tilePosY, int& tileWidth, int& 
tileHeight) const
 {
     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)
+bool TileCache::intersectsTile(const std::string& fileName, int part, int x, 
int y, int width, int height) const
 {
     int tilePart, tilePixelWidth, tilePixelHeight, tilePosX, tilePosY, 
tileWidth, tileHeight;
     if (parseCacheFileName(fileName, tilePart, tilePixelWidth, 
tilePixelHeight, tilePosX, tilePosY, tileWidth, tileHeight))
diff --git a/loolwsd/TileCache.hpp b/loolwsd/TileCache.hpp
index 6d206fc..322387d 100644
--- a/loolwsd/TileCache.hpp
+++ b/loolwsd/TileCache.hpp
@@ -80,10 +80,10 @@ private:
     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);
+    bool parseCacheFileName(const std::string& fileName, int& part, int& 
width, int& height, int& tilePosX, int& tilePosY, int& tileWidth, int& 
tileHeight) const;
 
     /// 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);
+    bool intersectsTile(const std::string& fileName, int part, int x, int y, 
int width, int height) const;
 
     /// Load the timestamp from modtime.txt.
     Poco::Timestamp getLastModified();
@@ -94,7 +94,7 @@ private:
 
     std::mutex _cacheMutex;
 
-    std::mutex _tilesBeingRenderedMutex;
+    mutable std::mutex _tilesBeingRenderedMutex;
 
     std::map<std::string, std::shared_ptr<TileBeingRendered>> 
_tilesBeingRendered;
 };
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to