diff --git a/cli/cppcheckexecutor.h b/cli/cppcheckexecutor.h index 8c26234b9f0..48cc40bea97 100644 --- a/cli/cppcheckexecutor.h +++ b/cli/cppcheckexecutor.h @@ -49,7 +49,7 @@ class CppCheckExecutor { */ CppCheckExecutor() = default; CppCheckExecutor(const CppCheckExecutor &) = delete; - void operator=(const CppCheckExecutor&) = delete; + CppCheckExecutor& operator=(const CppCheckExecutor&) = delete; /** * Starts the checking. diff --git a/cli/executor.h b/cli/executor.h index a2f37767410..a79077794ae 100644 --- a/cli/executor.h +++ b/cli/executor.h @@ -45,7 +45,7 @@ class Executor { virtual ~Executor() = default; Executor(const Executor &) = delete; - void operator=(const Executor &) = delete; + Executor& operator=(const Executor &) = delete; virtual unsigned int check() = 0; diff --git a/cli/processexecutor.h b/cli/processexecutor.h index 0ecde2372cf..4d30853190a 100644 --- a/cli/processexecutor.h +++ b/cli/processexecutor.h @@ -43,7 +43,7 @@ class ProcessExecutor : public Executor { public: ProcessExecutor(const std::list> &files, const std::list& fileSettings, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger, CppCheck::ExecuteCmdFn executeCommand); ProcessExecutor(const ProcessExecutor &) = delete; - void operator=(const ProcessExecutor &) = delete; + ProcessExecutor& operator=(const ProcessExecutor &) = delete; unsigned int check() override; diff --git a/cli/singleexecutor.h b/cli/singleexecutor.h index 43584c68a51..ae8fd9f2d58 100644 --- a/cli/singleexecutor.h +++ b/cli/singleexecutor.h @@ -37,7 +37,7 @@ class SingleExecutor : public Executor public: SingleExecutor(CppCheck &cppcheck, const std::list> &files, const std::list& fileSettings, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger); SingleExecutor(const SingleExecutor &) = delete; - void operator=(const SingleExecutor &) = delete; + SingleExecutor& operator=(const SingleExecutor &) = delete; unsigned int check() override; diff --git a/cli/threadexecutor.h b/cli/threadexecutor.h index 47a6173ad27..d1efff7294d 100644 --- a/cli/threadexecutor.h +++ b/cli/threadexecutor.h @@ -45,7 +45,7 @@ class ThreadExecutor : public Executor { public: ThreadExecutor(const std::list> &files, const std::list& fileSettings, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger, CppCheck::ExecuteCmdFn executeCommand); ThreadExecutor(const ThreadExecutor &) = delete; - void operator=(const ThreadExecutor &) = delete; + ThreadExecutor& operator=(const ThreadExecutor &) = delete; unsigned int check() override; diff --git a/lib/checkmemoryleak.h b/lib/checkmemoryleak.h index 20309873c14..d5a6a5f635d 100644 --- a/lib/checkmemoryleak.h +++ b/lib/checkmemoryleak.h @@ -86,7 +86,7 @@ class CPPCHECKLIB CheckMemoryLeak { public: CheckMemoryLeak() = delete; CheckMemoryLeak(const CheckMemoryLeak &) = delete; - void operator=(const CheckMemoryLeak &) = delete; + CheckMemoryLeak& operator=(const CheckMemoryLeak &) = delete; CheckMemoryLeak(const Tokenizer *t, ErrorLogger *e, const Settings *s) : mTokenizer_(t), mErrorLogger_(e), mSettings_(s) {}