diff --git a/fuse/Fuse.h b/fuse/Fuse.h index ce2d96ef..5b7fc0ce 100644 --- a/fuse/Fuse.h +++ b/fuse/Fuse.h @@ -16,14 +16,14 @@ class Device; namespace fuse { class Filesystem; -class Fuse { +class Fuse final { public: explicit Fuse(Filesystem *fs); - virtual ~Fuse(); + ~Fuse(); - void run(int argc, char **argv); - bool running() const; - void stop(); + void run(int argc, char **argv); + bool running() const; + void stop(); int getattr(const boost::filesystem::path &path, struct stat *stbuf); int fgetattr(const boost::filesystem::path &path, struct stat *stbuf, fuse_file_info *fileinfo); diff --git a/fuse/FuseErrnoException.h b/fuse/FuseErrnoException.h index bdfeab70..b0b0faa8 100644 --- a/fuse/FuseErrnoException.h +++ b/fuse/FuseErrnoException.h @@ -9,10 +9,9 @@ namespace fspp { namespace fuse{ -class FuseErrnoException: public std::runtime_error { +class FuseErrnoException final: public std::runtime_error { public: explicit FuseErrnoException(int errno_); - virtual ~FuseErrnoException(); int getErrno() const; private: @@ -30,9 +29,6 @@ inline FuseErrnoException::FuseErrnoException(int errno_) ASSERT(_errno != 0, "Errno shouldn't be zero"); } -inline FuseErrnoException::~FuseErrnoException() { -} - inline int FuseErrnoException::getErrno() const { return _errno; } @@ -40,4 +36,4 @@ inline int FuseErrnoException::getErrno() const { } } -#endif /* FSPP_FUSE_FUSEERRNOEXCEPTION_H_ */ +#endif diff --git a/impl/FilesystemImpl.h b/impl/FilesystemImpl.h index a821ccd7..6f97b514 100644 --- a/impl/FilesystemImpl.h +++ b/impl/FilesystemImpl.h @@ -17,7 +17,7 @@ class File; class Symlink; class OpenFile; -class FilesystemImpl: public fuse::Filesystem { +class FilesystemImpl final: public fuse::Filesystem { public: explicit FilesystemImpl(Device *device); virtual ~FilesystemImpl(); @@ -98,4 +98,4 @@ private: } -#endif /* FSPP_IMPL_FILESYSTEMIMPL_H_ */ +#endif diff --git a/impl/FuseOpenFileList.h b/impl/FuseOpenFileList.h index 77573d17..ef97f019 100644 --- a/impl/FuseOpenFileList.h +++ b/impl/FuseOpenFileList.h @@ -9,10 +9,10 @@ namespace fspp { -class FuseOpenFileList { +class FuseOpenFileList final { public: FuseOpenFileList(); - virtual ~FuseOpenFileList(); + ~FuseOpenFileList(); int open(cpputils::unique_ref file); OpenFile *get(int descriptor); @@ -46,4 +46,4 @@ inline void FuseOpenFileList::close(int descriptor) { } -#endif /* FSPP_IMPL_FUSEOPENFILELIST_H_ */ +#endif diff --git a/impl/IdList.h b/impl/IdList.h index bcbffe12..0a8f196e 100644 --- a/impl/IdList.h +++ b/impl/IdList.h @@ -10,7 +10,7 @@ namespace fspp { template -class IdList { +class IdList final { public: IdList(); virtual ~IdList(); @@ -24,7 +24,7 @@ private: int _id_counter; mutable std::mutex _mutex; - DISALLOW_COPY_AND_ASSIGN(IdList) + DISALLOW_COPY_AND_ASSIGN(IdList); }; template @@ -67,6 +67,6 @@ void IdList::remove(int id) { _entries.erase(found_iter); } -} /* namespace fspp */ +} -#endif /* FSPP_FUSE_IDLIST_H_ */ +#endif diff --git a/impl/Profiler.h b/impl/Profiler.h index b5f8ec72..0bf6d838 100644 --- a/impl/Profiler.h +++ b/impl/Profiler.h @@ -7,7 +7,7 @@ #include namespace fspp { - class Profiler { + class Profiler final { public: Profiler(std::atomic_uint_fast64_t *targetForAddingNanosec); ~Profiler(); diff --git a/test/testutils/InMemoryFile.h b/test/testutils/InMemoryFile.h index 04c9f054..9fa7c831 100644 --- a/test/testutils/InMemoryFile.h +++ b/test/testutils/InMemoryFile.h @@ -4,10 +4,10 @@ #include -class InMemoryFile { +class InMemoryFile final { public: InMemoryFile(cpputils::Data data); - virtual ~InMemoryFile(); + ~InMemoryFile(); int read(void *buf, size_t count, off_t offset) const;