enabled and mitigated `modernize-use-equals-default` clang-tidy warnings / removed unnecessary default destructors (#5335)
This commit is contained in:
parent
6a263ba026
commit
84a9b3a5f2
|
@ -45,7 +45,6 @@ Checks: >
|
||||||
-modernize-replace-auto-ptr,
|
-modernize-replace-auto-ptr,
|
||||||
-modernize-return-braced-init-list,
|
-modernize-return-braced-init-list,
|
||||||
-modernize-use-auto,
|
-modernize-use-auto,
|
||||||
-modernize-use-equals-default,
|
|
||||||
-modernize-use-trailing-return-type,
|
-modernize-use-trailing-return-type,
|
||||||
-performance-avoid-endl,
|
-performance-avoid-endl,
|
||||||
-performance-inefficient-string-concatenation,
|
-performance-inefficient-string-concatenation,
|
||||||
|
|
|
@ -63,7 +63,6 @@ This does not appear to be useful as it is reported on very common code.
|
||||||
|
|
||||||
It was decided not to apply these.
|
It was decided not to apply these.
|
||||||
|
|
||||||
`modernize-use-equals-default`<br/>
|
|
||||||
`modernize-loop-convert`<br/>
|
`modernize-loop-convert`<br/>
|
||||||
|
|
||||||
These might change the behavior of code which might not be intended (need to file an upstream issue)
|
These might change the behavior of code which might not be intended (need to file an upstream issue)
|
||||||
|
|
|
@ -31,9 +31,6 @@ Executor::Executor(const std::map<std::string, std::size_t> &files, const Settin
|
||||||
: mFiles(files), mSettings(settings), mSuppressions(suppressions), mErrorLogger(errorLogger)
|
: mFiles(files), mSettings(settings), mSuppressions(suppressions), mErrorLogger(errorLogger)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Executor::~Executor()
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool Executor::hasToLog(const ErrorMessage &msg)
|
bool Executor::hasToLog(const ErrorMessage &msg)
|
||||||
{
|
{
|
||||||
if (!mSuppressions.isSuppressed(msg))
|
if (!mSuppressions.isSuppressed(msg))
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Suppressions;
|
||||||
class Executor {
|
class Executor {
|
||||||
public:
|
public:
|
||||||
Executor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
Executor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
||||||
virtual ~Executor();
|
virtual ~Executor() = default;
|
||||||
|
|
||||||
Executor(const Executor &) = delete;
|
Executor(const Executor &) = delete;
|
||||||
void operator=(const Executor &) = delete;
|
void operator=(const Executor &) = delete;
|
||||||
|
|
|
@ -67,9 +67,6 @@ ProcessExecutor::ProcessExecutor(const std::map<std::string, std::size_t> &files
|
||||||
assert(mSettings.jobs > 1);
|
assert(mSettings.jobs > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProcessExecutor::~ProcessExecutor()
|
|
||||||
{}
|
|
||||||
|
|
||||||
class PipeWriter : public ErrorLogger {
|
class PipeWriter : public ErrorLogger {
|
||||||
public:
|
public:
|
||||||
enum PipeSignal {REPORT_OUT='1',REPORT_ERROR='2', CHILD_END='5'};
|
enum PipeSignal {REPORT_OUT='1',REPORT_ERROR='2', CHILD_END='5'};
|
||||||
|
|
|
@ -40,7 +40,6 @@ class ProcessExecutor : public Executor {
|
||||||
public:
|
public:
|
||||||
ProcessExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
ProcessExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
||||||
ProcessExecutor(const ProcessExecutor &) = delete;
|
ProcessExecutor(const ProcessExecutor &) = delete;
|
||||||
~ProcessExecutor() override;
|
|
||||||
void operator=(const ProcessExecutor &) = delete;
|
void operator=(const ProcessExecutor &) = delete;
|
||||||
|
|
||||||
unsigned int check() override;
|
unsigned int check() override;
|
||||||
|
|
|
@ -37,9 +37,6 @@ SingleExecutor::SingleExecutor(CppCheck &cppcheck, const std::map<std::string, s
|
||||||
assert(mSettings.jobs == 1);
|
assert(mSettings.jobs == 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
SingleExecutor::~SingleExecutor()
|
|
||||||
{}
|
|
||||||
|
|
||||||
// TODO: markup handling is not performed with multiple jobs
|
// TODO: markup handling is not performed with multiple jobs
|
||||||
unsigned int SingleExecutor::check()
|
unsigned int SingleExecutor::check()
|
||||||
{
|
{
|
||||||
|
|
|
@ -35,7 +35,6 @@ class SingleExecutor : public Executor
|
||||||
public:
|
public:
|
||||||
SingleExecutor(CppCheck &cppcheck, const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
SingleExecutor(CppCheck &cppcheck, const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
||||||
SingleExecutor(const SingleExecutor &) = delete;
|
SingleExecutor(const SingleExecutor &) = delete;
|
||||||
~SingleExecutor() override;
|
|
||||||
void operator=(const SingleExecutor &) = delete;
|
void operator=(const SingleExecutor &) = delete;
|
||||||
|
|
||||||
unsigned int check() override;
|
unsigned int check() override;
|
||||||
|
|
|
@ -46,9 +46,6 @@ ThreadExecutor::ThreadExecutor(const std::map<std::string, std::size_t> &files,
|
||||||
assert(mSettings.jobs > 1);
|
assert(mSettings.jobs > 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
ThreadExecutor::~ThreadExecutor()
|
|
||||||
{}
|
|
||||||
|
|
||||||
class SyncLogForwarder : public ErrorLogger
|
class SyncLogForwarder : public ErrorLogger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -40,7 +40,6 @@ class ThreadExecutor : public Executor {
|
||||||
public:
|
public:
|
||||||
ThreadExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
ThreadExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
|
||||||
ThreadExecutor(const ThreadExecutor &) = delete;
|
ThreadExecutor(const ThreadExecutor &) = delete;
|
||||||
~ThreadExecutor() override;
|
|
||||||
void operator=(const ThreadExecutor &) = delete;
|
void operator=(const ThreadExecutor &) = delete;
|
||||||
|
|
||||||
unsigned int check() override;
|
unsigned int check() override;
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
*/
|
*/
|
||||||
class Application {
|
class Application {
|
||||||
public:
|
public:
|
||||||
Application() {}
|
Application() = default;
|
||||||
Application(QString name, QString path, QString params);
|
Application(QString name, QString path, QString params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -86,14 +86,7 @@ static bool executeCommand(std::string exe, std::vector<std::string> args, std::
|
||||||
CheckThread::CheckThread(ThreadResult &result) :
|
CheckThread::CheckThread(ThreadResult &result) :
|
||||||
mResult(result),
|
mResult(result),
|
||||||
mCppcheck(result, true, executeCommand)
|
mCppcheck(result, true, executeCommand)
|
||||||
{
|
{}
|
||||||
//ctor
|
|
||||||
}
|
|
||||||
|
|
||||||
CheckThread::~CheckThread()
|
|
||||||
{
|
|
||||||
//dtor
|
|
||||||
}
|
|
||||||
|
|
||||||
void CheckThread::check(const Settings &settings)
|
void CheckThread::check(const Settings &settings)
|
||||||
{
|
{
|
||||||
|
|
|
@ -46,7 +46,6 @@ class CheckThread : public QThread {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit CheckThread(ThreadResult &result);
|
explicit CheckThread(ThreadResult &result);
|
||||||
~CheckThread() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set settings for cppcheck
|
* @brief Set settings for cppcheck
|
||||||
|
|
|
@ -35,7 +35,6 @@ class SelectColorButton : public QPushButton {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SelectColorButton(QWidget* parent);
|
explicit SelectColorButton(QWidget* parent);
|
||||||
~SelectColorButton() override {}
|
|
||||||
|
|
||||||
void setColor(const QColor& color);
|
void setColor(const QColor& color);
|
||||||
const QColor& getColor();
|
const QColor& getColor();
|
||||||
|
@ -57,7 +56,6 @@ class SelectFontWeightCombo : public QComboBox {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit SelectFontWeightCombo(QWidget* parent);
|
explicit SelectFontWeightCombo(QWidget* parent);
|
||||||
~SelectFontWeightCombo() override {}
|
|
||||||
|
|
||||||
void setWeight(const QFont::Weight& weight);
|
void setWeight(const QFont::Weight& weight);
|
||||||
const QFont::Weight& getWeight();
|
const QFont::Weight& getWeight();
|
||||||
|
|
|
@ -42,7 +42,6 @@ class StyleEditDialog : public QDialog {
|
||||||
public:
|
public:
|
||||||
explicit StyleEditDialog(const CodeEditorStyle& newStyle,
|
explicit StyleEditDialog(const CodeEditorStyle& newStyle,
|
||||||
QWidget *parent = nullptr);
|
QWidget *parent = nullptr);
|
||||||
~StyleEditDialog() override {}
|
|
||||||
|
|
||||||
CodeEditorStyle getStyle();
|
CodeEditorStyle getStyle();
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,6 @@
|
||||||
const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U;
|
const unsigned int CppcheckLibraryData::Function::Arg::ANY = ~0U;
|
||||||
const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U;
|
const unsigned int CppcheckLibraryData::Function::Arg::VARIADIC = ~1U;
|
||||||
|
|
||||||
CppcheckLibraryData::CppcheckLibraryData()
|
|
||||||
{}
|
|
||||||
|
|
||||||
static std::string unhandledElement(const QXmlStreamReader &xmlReader)
|
static std::string unhandledElement(const QXmlStreamReader &xmlReader)
|
||||||
{
|
{
|
||||||
throw std::runtime_error(QObject::tr("line %1: Unhandled element %2").arg(xmlReader.lineNumber()).arg(xmlReader.name().toString()).toStdString());
|
throw std::runtime_error(QObject::tr("line %1: Unhandled element %2").arg(xmlReader.lineNumber()).arg(xmlReader.name().toString()).toStdString());
|
||||||
|
|
|
@ -30,7 +30,7 @@ class QIODevice;
|
||||||
|
|
||||||
class CppcheckLibraryData {
|
class CppcheckLibraryData {
|
||||||
public:
|
public:
|
||||||
CppcheckLibraryData();
|
CppcheckLibraryData() = default;
|
||||||
|
|
||||||
struct Container {
|
struct Container {
|
||||||
QString id;
|
QString id;
|
||||||
|
|
|
@ -30,9 +30,6 @@ CsvReport::CsvReport(const QString &filename) :
|
||||||
Report(filename)
|
Report(filename)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
CsvReport::~CsvReport()
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool CsvReport::create()
|
bool CsvReport::create()
|
||||||
{
|
{
|
||||||
if (Report::create()) {
|
if (Report::create()) {
|
||||||
|
|
|
@ -39,7 +39,6 @@ class ErrorItem;
|
||||||
class CsvReport : public Report {
|
class CsvReport : public Report {
|
||||||
public:
|
public:
|
||||||
explicit CsvReport(const QString &filename);
|
explicit CsvReport(const QString &filename);
|
||||||
~CsvReport() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create the report (file).
|
* @brief Create the report (file).
|
||||||
|
|
|
@ -27,9 +27,6 @@ PrintableReport::PrintableReport() :
|
||||||
Report(QString())
|
Report(QString())
|
||||||
{}
|
{}
|
||||||
|
|
||||||
PrintableReport::~PrintableReport()
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool PrintableReport::create()
|
bool PrintableReport::create()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -36,7 +36,6 @@ class ErrorItem;
|
||||||
class PrintableReport : public Report {
|
class PrintableReport : public Report {
|
||||||
public:
|
public:
|
||||||
PrintableReport();
|
PrintableReport();
|
||||||
~PrintableReport() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create the report (file).
|
* @brief Create the report (file).
|
||||||
|
|
|
@ -91,9 +91,6 @@ ResultsTree::ResultsTree(QWidget * parent) :
|
||||||
connect(this, &ResultsTree::doubleClicked, this, &ResultsTree::quickStartApplication);
|
connect(this, &ResultsTree::doubleClicked, this, &ResultsTree::quickStartApplication);
|
||||||
}
|
}
|
||||||
|
|
||||||
ResultsTree::~ResultsTree()
|
|
||||||
{}
|
|
||||||
|
|
||||||
void ResultsTree::keyPressEvent(QKeyEvent *event)
|
void ResultsTree::keyPressEvent(QKeyEvent *event)
|
||||||
{
|
{
|
||||||
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
|
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ResultsTree : public QTreeView {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit ResultsTree(QWidget * parent = nullptr);
|
explicit ResultsTree(QWidget * parent = nullptr);
|
||||||
~ResultsTree() override;
|
|
||||||
void initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler);
|
void initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -40,8 +40,8 @@ const char Settings::SafeChecks::XmlExternalFunctions[] = "external-functions";
|
||||||
const char Settings::SafeChecks::XmlInternalFunctions[] = "internal-functions";
|
const char Settings::SafeChecks::XmlInternalFunctions[] = "internal-functions";
|
||||||
const char Settings::SafeChecks::XmlExternalVariables[] = "external-variables";
|
const char Settings::SafeChecks::XmlExternalVariables[] = "external-variables";
|
||||||
Settings::Settings() : maxCtuDepth(10) {}
|
Settings::Settings() : maxCtuDepth(10) {}
|
||||||
cppcheck::Platform::Platform() {}
|
cppcheck::Platform::Platform() = default;
|
||||||
ImportProject::ImportProject() {}
|
ImportProject::ImportProject() = default;
|
||||||
bool ImportProject::sourceFileExists(const std::string & /*file*/) {
|
bool ImportProject::sourceFileExists(const std::string & /*file*/) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,11 +28,6 @@
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QMutexLocker>
|
#include <QMutexLocker>
|
||||||
|
|
||||||
ThreadResult::~ThreadResult()
|
|
||||||
{
|
|
||||||
//dtor
|
|
||||||
}
|
|
||||||
|
|
||||||
void ThreadResult::reportOut(const std::string &outmsg, Color /*c*/)
|
void ThreadResult::reportOut(const std::string &outmsg, Color /*c*/)
|
||||||
{
|
{
|
||||||
emit log(QString::fromStdString(outmsg));
|
emit log(QString::fromStdString(outmsg));
|
||||||
|
|
|
@ -46,7 +46,6 @@ class ThreadResult : public QObject, public ErrorLogger {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
ThreadResult() = default;
|
ThreadResult() = default;
|
||||||
~ThreadResult() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get next unprocessed file
|
* @brief Get next unprocessed file
|
||||||
|
|
|
@ -62,9 +62,6 @@ TranslationHandler::TranslationHandler(QObject *parent) :
|
||||||
addTranslation("Swedish", "cppcheck_sv");
|
addTranslation("Swedish", "cppcheck_sv");
|
||||||
}
|
}
|
||||||
|
|
||||||
TranslationHandler::~TranslationHandler()
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool TranslationHandler::setLanguage(const QString &code)
|
bool TranslationHandler::setLanguage(const QString &code)
|
||||||
{
|
{
|
||||||
bool failure = false;
|
bool failure = false;
|
||||||
|
|
|
@ -63,7 +63,6 @@ class TranslationHandler : QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit TranslationHandler(QObject *parent = nullptr);
|
explicit TranslationHandler(QObject *parent = nullptr);
|
||||||
~TranslationHandler() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get a list of available translations.
|
* @brief Get a list of available translations.
|
||||||
|
|
|
@ -29,9 +29,6 @@ TxtReport::TxtReport(const QString &filename) :
|
||||||
Report(filename)
|
Report(filename)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
TxtReport::~TxtReport()
|
|
||||||
{}
|
|
||||||
|
|
||||||
bool TxtReport::create()
|
bool TxtReport::create()
|
||||||
{
|
{
|
||||||
if (Report::create()) {
|
if (Report::create()) {
|
||||||
|
|
|
@ -40,7 +40,6 @@ class TxtReport : public Report {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TxtReport(const QString &filename);
|
explicit TxtReport(const QString &filename);
|
||||||
~TxtReport() override;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Create the report (file).
|
* @brief Create the report (file).
|
||||||
|
|
|
@ -184,7 +184,7 @@ struct Analyzer {
|
||||||
virtual bool invalid() const {
|
virtual bool invalid() const {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
virtual ~Analyzer() {}
|
virtual ~Analyzer() = default;
|
||||||
Analyzer(const Analyzer&) = default;
|
Analyzer(const Analyzer&) = default;
|
||||||
protected:
|
protected:
|
||||||
Analyzer() = default;
|
Analyzer() = default;
|
||||||
|
|
|
@ -100,8 +100,8 @@ public:
|
||||||
/** Base class used for whole-program analysis */
|
/** Base class used for whole-program analysis */
|
||||||
class CPPCHECKLIB FileInfo {
|
class CPPCHECKLIB FileInfo {
|
||||||
public:
|
public:
|
||||||
FileInfo() {}
|
FileInfo() = default;
|
||||||
virtual ~FileInfo() {}
|
virtual ~FileInfo() = default;
|
||||||
virtual std::string toString() const {
|
virtual std::string toString() const {
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,7 @@ namespace CTU {
|
||||||
: callId(std::move(callId)), callArgNr(callArgNr), callFunctionName(std::move(callFunctionName)), location(std::move(loc))
|
: callId(std::move(callId)), callArgNr(callArgNr), callFunctionName(std::move(callFunctionName)), location(std::move(loc))
|
||||||
{}
|
{}
|
||||||
CallBase(const Tokenizer *tokenizer, const Token *callToken);
|
CallBase(const Tokenizer *tokenizer, const Token *callToken);
|
||||||
virtual ~CallBase() {}
|
virtual ~CallBase() = default;
|
||||||
CallBase(const CallBase&) = default;
|
CallBase(const CallBase&) = default;
|
||||||
std::string callId;
|
std::string callId;
|
||||||
int callArgNr{};
|
int callArgNr{};
|
||||||
|
|
|
@ -219,8 +219,8 @@ private:
|
||||||
*/
|
*/
|
||||||
class CPPCHECKLIB ErrorLogger {
|
class CPPCHECKLIB ErrorLogger {
|
||||||
public:
|
public:
|
||||||
ErrorLogger() {}
|
ErrorLogger() = default;
|
||||||
virtual ~ErrorLogger() {}
|
virtual ~ErrorLogger() = default;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Information about progress is directed here.
|
* Information about progress is directed here.
|
||||||
|
|
|
@ -33,7 +33,7 @@ template<class T> class ValuePtr;
|
||||||
struct InferModel {
|
struct InferModel {
|
||||||
virtual bool match(const ValueFlow::Value& value) const = 0;
|
virtual bool match(const ValueFlow::Value& value) const = 0;
|
||||||
virtual ValueFlow::Value yield(MathLib::bigint value) const = 0;
|
virtual ValueFlow::Value yield(MathLib::bigint value) const = 0;
|
||||||
virtual ~InferModel() {}
|
virtual ~InferModel() = default;
|
||||||
InferModel(const InferModel&) = default;
|
InferModel(const InferModel&) = default;
|
||||||
protected:
|
protected:
|
||||||
InferModel() = default;
|
InferModel() = default;
|
||||||
|
|
|
@ -284,9 +284,6 @@ TemplateSimplifier::TemplateSimplifier(Tokenizer &tokenizer)
|
||||||
mErrorLogger(mTokenizer.mErrorLogger)
|
mErrorLogger(mTokenizer.mErrorLogger)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
TemplateSimplifier::~TemplateSimplifier()
|
|
||||||
{}
|
|
||||||
|
|
||||||
void TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates()
|
void TemplateSimplifier::checkComplicatedSyntaxErrorsInTemplates()
|
||||||
{
|
{
|
||||||
// check for more complicated syntax errors when using templates..
|
// check for more complicated syntax errors when using templates..
|
||||||
|
|
|
@ -48,7 +48,6 @@ class CPPCHECKLIB TemplateSimplifier {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit TemplateSimplifier(Tokenizer &tokenizer);
|
explicit TemplateSimplifier(Tokenizer &tokenizer);
|
||||||
~TemplateSimplifier();
|
|
||||||
|
|
||||||
std::string dump() const {
|
std::string dump() const {
|
||||||
return mDump;
|
return mDump;
|
||||||
|
|
|
@ -37,7 +37,7 @@ enum class SHOWTIME_MODES {
|
||||||
|
|
||||||
class CPPCHECKLIB TimerResultsIntf {
|
class CPPCHECKLIB TimerResultsIntf {
|
||||||
public:
|
public:
|
||||||
virtual ~TimerResultsIntf() {}
|
virtual ~TimerResultsIntf() = default;
|
||||||
|
|
||||||
virtual void addResults(const std::string& str, std::clock_t clocks) = 0;
|
virtual void addResults(const std::string& str, std::clock_t clocks) = 0;
|
||||||
};
|
};
|
||||||
|
@ -54,7 +54,7 @@ struct TimerResultsData {
|
||||||
|
|
||||||
class CPPCHECKLIB TimerResults : public TimerResultsIntf {
|
class CPPCHECKLIB TimerResults : public TimerResultsIntf {
|
||||||
public:
|
public:
|
||||||
TimerResults() {}
|
TimerResults() = default;
|
||||||
|
|
||||||
void showResults(SHOWTIME_MODES mode) const;
|
void showResults(SHOWTIME_MODES mode) const;
|
||||||
void addResults(const std::string& str, std::clock_t clocks) override;
|
void addResults(const std::string& str, std::clock_t clocks) override;
|
||||||
|
|
|
@ -6676,7 +6676,7 @@ struct ConditionHandler {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
virtual ~ConditionHandler() {}
|
virtual ~ConditionHandler() = default;
|
||||||
ConditionHandler(const ConditionHandler&) = default;
|
ConditionHandler(const ConditionHandler&) = default;
|
||||||
protected:
|
protected:
|
||||||
ConditionHandler() = default;
|
ConditionHandler() = default;
|
||||||
|
@ -9291,7 +9291,7 @@ struct ValueFlowPass {
|
||||||
virtual void run(const ValueFlowState& state) const = 0;
|
virtual void run(const ValueFlowState& state) const = 0;
|
||||||
// Returns true if pass needs C++
|
// Returns true if pass needs C++
|
||||||
virtual bool cpp() const = 0;
|
virtual bool cpp() const = 0;
|
||||||
virtual ~ValueFlowPass() noexcept {}
|
virtual ~ValueFlowPass() noexcept = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ValueFlowPassRunner {
|
struct ValueFlowPassRunner {
|
||||||
|
|
|
@ -97,7 +97,6 @@ public:
|
||||||
operator bool() const NOEXCEPT {
|
operator bool() const NOEXCEPT {
|
||||||
return !!mPtr;
|
return !!mPtr;
|
||||||
}
|
}
|
||||||
~ValuePtr() {}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<T> mPtr;
|
std::shared_ptr<T> mPtr;
|
||||||
|
|
|
@ -241,7 +241,6 @@ public:
|
||||||
const std::string classname;
|
const std::string classname;
|
||||||
|
|
||||||
explicit TestFixture(const char * const _name);
|
explicit TestFixture(const char * const _name);
|
||||||
~TestFixture() override {}
|
|
||||||
|
|
||||||
static std::size_t runTests(const options& args);
|
static std::size_t runTests(const options& args);
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue