[Libreoffice-commits] online.git: common/FileUtil.cpp
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Dec 10 07:56:04 UTC 2018
common/FileUtil.cpp | 19 ++++++++++++-------
1 file changed, 12 insertions(+), 7 deletions(-)
New commits:
commit b1f06d1c0a18367bea30fd843f14ace3b7785380
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Dec 10 08:55:24 2018 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Dec 10 08:55:39 2018 +0100
FileUtil: make fs members private
Change-Id: I921118c42a20117725074169f6425e9ff87bc54b
diff --git a/common/FileUtil.cpp b/common/FileUtil.cpp
index 0ba6256d0..46f1dde85 100644
--- a/common/FileUtil.cpp
+++ b/common/FileUtil.cpp
@@ -166,20 +166,25 @@ namespace
struct fs
{
- fs(const std::string& p, dev_t d)
- : path(p), dev(d)
+ fs(const std::string& path, dev_t dev)
+ : _path(path), _dev(dev)
{
}
- std::string path;
- dev_t dev;
+ const std::string& getPath() const { return _path; }
+
+ dev_t getDev() const { return _dev; }
+
+ private:
+ std::string _path;
+ dev_t _dev;
};
struct fsComparator
{
bool operator() (const fs& lhs, const fs& rhs) const
{
- return (lhs.dev < rhs.dev);
+ return (lhs.getDev() < rhs.getDev());
}
};
@@ -226,9 +231,9 @@ namespace FileUtil
for (const auto& i: filesystems)
{
- if (!checkDiskSpace(i.path))
+ if (!checkDiskSpace(i.getPath()))
{
- return i.path;
+ return i.getPath();
}
}
More information about the Libreoffice-commits
mailing list