Skip to content

Commit

Permalink
enabled and mitigated modernize-use-equals-default clang-tidy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
firewave committed Aug 16, 2023
1 parent 6a263ba commit fdfd6ad
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 21 deletions.
1 change: 0 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Checks: >
-modernize-replace-auto-ptr,
-modernize-return-braced-init-list,
-modernize-use-auto,
-modernize-use-equals-default,
-modernize-use-trailing-return-type,
-performance-avoid-endl,
-performance-inefficient-string-concatenation,
Expand Down
1 change: 0 additions & 1 deletion clang-tidy.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

`modernize-use-equals-default`<br/>
`modernize-loop-convert`<br/>

These might change the behavior of code which might not be intended (need to file an upstream issue)
Expand Down
9 changes: 1 addition & 8 deletions gui/checkthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,7 @@ static bool executeCommand(std::string exe, std::vector<std::string> args, std::
CheckThread::CheckThread(ThreadResult &result) :
mResult(result),
mCppcheck(result, true, executeCommand)
{
//ctor
}

CheckThread::~CheckThread()
{
//dtor
}
{}

void CheckThread::check(const Settings &settings)
{
Expand Down
2 changes: 1 addition & 1 deletion gui/checkthread.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CheckThread : public QThread {
Q_OBJECT
public:
explicit CheckThread(ThreadResult &result);
~CheckThread() override;
~CheckThread() override = default;

/**
* @brief Set settings for cppcheck
Expand Down
3 changes: 0 additions & 3 deletions gui/csvreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ CsvReport::CsvReport(const QString &filename) :
Report(filename)
{}

CsvReport::~CsvReport()
{}

bool CsvReport::create()
{
if (Report::create()) {
Expand Down
2 changes: 1 addition & 1 deletion gui/csvreport.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class ErrorItem;
class CsvReport : public Report {
public:
explicit CsvReport(const QString &filename);
~CsvReport() override;
~CsvReport() override = default;

/**
* @brief Create the report (file).
Expand Down
3 changes: 0 additions & 3 deletions gui/printablereport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ PrintableReport::PrintableReport() :
Report(QString())
{}

PrintableReport::~PrintableReport()
{}

bool PrintableReport::create()
{
return true;
Expand Down
2 changes: 1 addition & 1 deletion gui/printablereport.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ErrorItem;
class PrintableReport : public Report {
public:
PrintableReport();
~PrintableReport() override;
~PrintableReport() override = default;

/**
* @brief Create the report (file).
Expand Down
4 changes: 2 additions & 2 deletions lib/timer.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ enum class SHOWTIME_MODES {

class CPPCHECKLIB TimerResultsIntf {
public:
virtual ~TimerResultsIntf() {}
virtual ~TimerResultsIntf() = default;

virtual void addResults(const std::string& str, std::clock_t clocks) = 0;
};
Expand All @@ -54,7 +54,7 @@ struct TimerResultsData {

class CPPCHECKLIB TimerResults : public TimerResultsIntf {
public:
TimerResults() {}
TimerResults() = default;

void showResults(SHOWTIME_MODES mode) const;
void addResults(const std::string& str, std::clock_t clocks) override;
Expand Down

0 comments on commit fdfd6ad

Please sign in to comment.