From 6454e336e54bd2feb54a5ff23e0469ef58eb0dda Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 27 Dec 2017 13:15:53 +0100 Subject: [PATCH] Clang: Make ClangPathWatcherNotifier non copy-able There is already a destructor because the vtable should not be injected in every translation unit. Because of the rule of five we have to provide or omit the copy and move functions. So we delete them because we don't need them and any way it would be not smart to have to notifier. Change-Id: I35c00954eaa4e1bb299581a5e4ba5369d5cbf1cd Reviewed-by: Ivan Donchevskii --- src/libs/clangsupport/clangpathwatchernotifier.cpp | 5 +---- src/libs/clangsupport/clangpathwatchernotifier.h | 3 +++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/libs/clangsupport/clangpathwatchernotifier.cpp b/src/libs/clangsupport/clangpathwatchernotifier.cpp index 66f6b3534f5..ce596a9f776 100644 --- a/src/libs/clangsupport/clangpathwatchernotifier.cpp +++ b/src/libs/clangsupport/clangpathwatchernotifier.cpp @@ -27,9 +27,6 @@ namespace ClangBackEnd { -ClangPathWatcherNotifier::~ClangPathWatcherNotifier() -{ - -} +ClangPathWatcherNotifier::~ClangPathWatcherNotifier() = default; } // namespace ClangBackEnd diff --git a/src/libs/clangsupport/clangpathwatchernotifier.h b/src/libs/clangsupport/clangpathwatchernotifier.h index a2ee330c2fb..935e62ebb74 100644 --- a/src/libs/clangsupport/clangpathwatchernotifier.h +++ b/src/libs/clangsupport/clangpathwatchernotifier.h @@ -36,7 +36,10 @@ namespace ClangBackEnd { class CLANGSUPPORT_EXPORT ClangPathWatcherNotifier { public: + ClangPathWatcherNotifier() = default; virtual ~ClangPathWatcherNotifier(); + ClangPathWatcherNotifier(const ClangPathWatcherNotifier &) = delete; + void operator=(const ClangPathWatcherNotifier &) = delete; virtual void pathsWithIdsChanged(const Utils::SmallStringVector &ids) = 0; virtual void pathsChanged(const FilePathIds &filePathIds) = 0;