Refactoring: Use C++11 '=delete' to delete methods
This commit is contained in:
parent
9717a5afad
commit
96fc8efb4b
|
@ -63,15 +63,6 @@ private:
|
||||||
/** Enabled standards */
|
/** Enabled standards */
|
||||||
const Settings * const settings1;
|
const Settings * const settings1;
|
||||||
|
|
||||||
/** Disable the default constructors */
|
|
||||||
CheckMemoryLeak();
|
|
||||||
|
|
||||||
/** Disable the default constructors */
|
|
||||||
CheckMemoryLeak(const CheckMemoryLeak &);
|
|
||||||
|
|
||||||
/** disable assignment operator */
|
|
||||||
void operator=(const CheckMemoryLeak &);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Report error. Similar with the function Check::reportError
|
* Report error. Similar with the function Check::reportError
|
||||||
* @param tok the token where the error occurs
|
* @param tok the token where the error occurs
|
||||||
|
@ -93,6 +84,10 @@ private:
|
||||||
void reportErr(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe) const;
|
void reportErr(const std::list<const Token *> &callstack, Severity::SeverityType severity, const std::string &id, const std::string &msg, const CWE &cwe) const;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
CheckMemoryLeak() = delete;
|
||||||
|
CheckMemoryLeak(const CheckMemoryLeak &) = delete;
|
||||||
|
void operator=(const CheckMemoryLeak &) = delete;
|
||||||
|
|
||||||
CheckMemoryLeak(const Tokenizer *t, ErrorLogger *e, const Settings *s)
|
CheckMemoryLeak(const Tokenizer *t, ErrorLogger *e, const Settings *s)
|
||||||
: tokenizer(t), errorLogger(e), settings1(s) {
|
: tokenizer(t), errorLogger(e), settings1(s) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue