common/FileUtil.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
New commits: commit b1f06d1c0a18367bea30fd843f14ace3b7785380 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Dec 10 08:55:24 2018 +0100 Commit: Miklos Vajna <vmik...@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(); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits