From ac71b7716c98082ac6523415078036c31f6601de Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 3 Jan 2021 19:52:27 +0000 Subject: Use special members delete macro --- netfs/fuse/netfs.cpp | 6 ++---- netfs/unittests/testFuse.cpp | 7 ++----- 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 #include 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 +#include #include #include #include @@ -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 -- cgit v1.2.3