Skip to content

Commit 84a9b3a

Browse files
authored
enabled and mitigated modernize-use-equals-default clang-tidy warnings / removed unnecessary default destructors (cppcheck-opensource#5335)
1 parent 6a263ba commit 84a9b3a

41 files changed

Lines changed: 18 additions & 80 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.clang-tidy

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ Checks: >
4545
-modernize-replace-auto-ptr,
4646
-modernize-return-braced-init-list,
4747
-modernize-use-auto,
48-
-modernize-use-equals-default,
4948
-modernize-use-trailing-return-type,
5049
-performance-avoid-endl,
5150
-performance-inefficient-string-concatenation,

clang-tidy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ This does not appear to be useful as it is reported on very common code.
6363

6464
It was decided not to apply these.
6565

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

6968
These might change the behavior of code which might not be intended (need to file an upstream issue)

cli/executor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ Executor::Executor(const std::map<std::string, std::size_t> &files, const Settin
3131
: mFiles(files), mSettings(settings), mSuppressions(suppressions), mErrorLogger(errorLogger)
3232
{}
3333

34-
Executor::~Executor()
35-
{}
36-
3734
bool Executor::hasToLog(const ErrorMessage &msg)
3835
{
3936
if (!mSuppressions.isSuppressed(msg))

cli/executor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Suppressions;
4040
class Executor {
4141
public:
4242
Executor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
43-
virtual ~Executor();
43+
virtual ~Executor() = default;
4444

4545
Executor(const Executor &) = delete;
4646
void operator=(const Executor &) = delete;

cli/processexecutor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ ProcessExecutor::ProcessExecutor(const std::map<std::string, std::size_t> &files
6767
assert(mSettings.jobs > 1);
6868
}
6969

70-
ProcessExecutor::~ProcessExecutor()
71-
{}
72-
7370
class PipeWriter : public ErrorLogger {
7471
public:
7572
enum PipeSignal {REPORT_OUT='1',REPORT_ERROR='2', CHILD_END='5'};

cli/processexecutor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class ProcessExecutor : public Executor {
4040
public:
4141
ProcessExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
4242
ProcessExecutor(const ProcessExecutor &) = delete;
43-
~ProcessExecutor() override;
4443
void operator=(const ProcessExecutor &) = delete;
4544

4645
unsigned int check() override;

cli/singleexecutor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ SingleExecutor::SingleExecutor(CppCheck &cppcheck, const std::map<std::string, s
3737
assert(mSettings.jobs == 1);
3838
}
3939

40-
SingleExecutor::~SingleExecutor()
41-
{}
42-
4340
// TODO: markup handling is not performed with multiple jobs
4441
unsigned int SingleExecutor::check()
4542
{

cli/singleexecutor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ class SingleExecutor : public Executor
3535
public:
3636
SingleExecutor(CppCheck &cppcheck, const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
3737
SingleExecutor(const SingleExecutor &) = delete;
38-
~SingleExecutor() override;
3938
void operator=(const SingleExecutor &) = delete;
4039

4140
unsigned int check() override;

cli/threadexecutor.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,6 @@ ThreadExecutor::ThreadExecutor(const std::map<std::string, std::size_t> &files,
4646
assert(mSettings.jobs > 1);
4747
}
4848

49-
ThreadExecutor::~ThreadExecutor()
50-
{}
51-
5249
class SyncLogForwarder : public ErrorLogger
5350
{
5451
public:

cli/threadexecutor.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ class ThreadExecutor : public Executor {
4040
public:
4141
ThreadExecutor(const std::map<std::string, std::size_t> &files, const Settings &settings, Suppressions &suppressions, ErrorLogger &errorLogger);
4242
ThreadExecutor(const ThreadExecutor &) = delete;
43-
~ThreadExecutor() override;
4443
void operator=(const ThreadExecutor &) = delete;
4544

4645
unsigned int check() override;

0 commit comments

Comments
 (0)