From f93faf23d994f3a9c86d4e44f7e262699ba0de2a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 24 Sep 2019 21:03:13 +0100 Subject: Minor fixups --- netfs/daemon/daemonVolume.cpp | 2 +- netfs/daemon/daemonVolume.h | 2 +- netfs/unittests/testFuse.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/netfs/daemon/daemonVolume.cpp b/netfs/daemon/daemonVolume.cpp index dc16011..bdd899b 100644 --- a/netfs/daemon/daemonVolume.cpp +++ b/netfs/daemon/daemonVolume.cpp @@ -323,7 +323,7 @@ normalizedAppend(std::filesystem::path out, const std::filesystem::path && in) } std::filesystem::path -VolumeServer::resolvePath(std::string path) const +VolumeServer::resolvePath(std::string && path) const { return normalizedAppend(root, std::move(path)); } diff --git a/netfs/daemon/daemonVolume.h b/netfs/daemon/daemonVolume.h index 190f146..770cada 100644 --- a/netfs/daemon/daemonVolume.h +++ b/netfs/daemon/daemonVolume.h @@ -39,7 +39,7 @@ class VolumeServer : public NetFS::Volume { virtual void disconnect(const Ice::Current&) override; protected: - std::filesystem::path resolvePath(std::string path) const; + inline std::filesystem::path resolvePath(std::string && path) const; private: const std::filesystem::path root; diff --git a/netfs/unittests/testFuse.cpp b/netfs/unittests/testFuse.cpp index 80a33a8..2abe1f2 100644 --- a/netfs/unittests/testFuse.cpp +++ b/netfs/unittests/testFuse.cpp @@ -77,10 +77,10 @@ class FuseMountPoint : public MockDaemonHost, public NetFS::FuseApp { }; #define BOOST_CHECK_EQUAL_FIELD(left, right, field) \ - BOOST_CHECK_EQUAL(left.field, right.field); + BOOST_CHECK_EQUAL((left).field, (right).field); #define BOOST_CHECK_EQUAL_STAT(left, right) \ - BOOST_CHECK_NE(&left, &right); \ + BOOST_CHECK_NE(&(left), &(right)); \ BOOST_CHECK_EQUAL_FIELD(left, right, st_atim.tv_sec); \ BOOST_CHECK_EQUAL_FIELD(left, right, st_mtim.tv_sec); \ BOOST_CHECK_EQUAL_FIELD(left, right, st_ctim.tv_sec); \ -- cgit v1.2.3