summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-01-03 19:52:27 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-01-03 19:52:27 +0000
commitac71b7716c98082ac6523415078036c31f6601de (patch)
tree8e5661b748c446a4d91fbbdfc11744f7f7cc0e9d
parentNo naked new/delete in unit tests (diff)
downloadnetfs-ac71b7716c98082ac6523415078036c31f6601de.tar.bz2
netfs-ac71b7716c98082ac6523415078036c31f6601de.tar.xz
netfs-ac71b7716c98082ac6523415078036c31f6601de.zip
Use special members delete macro
-rw-r--r--netfs/fuse/netfs.cpp6
-rw-r--r--netfs/unittests/testFuse.cpp7
2 files changed, 4 insertions, 9 deletions
diff --git a/netfs/fuse/netfs.cpp b/netfs/fuse/netfs.cpp
index 9df3a75..77530ac 100644
--- a/netfs/fuse/netfs.cpp
+++ b/netfs/fuse/netfs.cpp
@@ -1,4 +1,5 @@
#include "fuseApp.h"
+#include <c++11Helpers.h>
#include <syslog.h>
class FuseImpl : public fuse_args, public NetFS::FuseApp {
@@ -14,16 +15,13 @@ public:
{
openlog("netfs", LOG_CONS | LOG_PID | LOG_NDELAY, LOG_USER);
}
- FuseImpl(const FuseImpl &) = delete;
- FuseImpl(FuseImpl &&) = delete;
~FuseImpl() override
{
closelog();
}
- void operator=(const FuseImpl &) = delete;
- void operator=(FuseImpl &&) = delete;
+ SPECIAL_MEMBERS_DELETE(FuseImpl);
struct fuse_context *
fuse_get_context() override
diff --git a/netfs/unittests/testFuse.cpp b/netfs/unittests/testFuse.cpp
index eebc37b..17095bb 100644
--- a/netfs/unittests/testFuse.cpp
+++ b/netfs/unittests/testFuse.cpp
@@ -1,6 +1,7 @@
#define BOOST_TEST_MODULE TestNetFSFuse
#include "mockDaemon.h"
#include <boost/test/unit_test.hpp>
+#include <c++11Helpers.h>
#include <cache.impl.h>
#include <definedDirs.h>
#include <filesystem>
@@ -43,11 +44,7 @@ public:
::fuse_destroy(fs);
}
- FuseMountPoint(const FuseMountPoint &) = delete;
- FuseMountPoint(FuseMountPoint &&) = delete;
-
- FuseMountPoint & operator=(const FuseMountPoint &) = delete;
- FuseMountPoint & operator=(FuseMountPoint &&) = delete;
+ SPECIAL_MEMBERS_DELETE(FuseMountPoint);
struct fuse_context *
fuse_get_context() override