Skip to content

Commit

Permalink
tidy: Replace default special member functions with the =default keyw…
Browse files Browse the repository at this point in the history
…ord.

Clang-tidy pointed out one places where a structure destructor was
identical to what the compiler would generate.  Marking this function
as "=default" allows the compiler more optimization chances.

This code was pointed out by clang-tidy's "use =default" check.

https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-equals-default.html
  • Loading branch information
linuxdude42 committed Dec 6, 2019
1 parent 9f246fd commit 4bc7df4
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 10 deletions.
4 changes: 0 additions & 4 deletions mythtv/libs/libmythbase/mythpower.cpp
Expand Up @@ -123,10 +123,6 @@ MythPower::MythPower()
connect(&m_featureTimer, &QTimer::timeout, this, &MythPower::FeatureTimeout);
}

MythPower::~MythPower()
{
}

void MythPower::Init(void)
{
QStringList supported;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythbase/mythpower.h
Expand Up @@ -74,7 +74,7 @@ class MBASE_PUBLIC MythPower : public QObject, public ReferenceCounter
static QMutex s_lock;

MythPower();
virtual ~MythPower();
virtual ~MythPower() = default;

virtual void Init (void);
virtual bool DoFeature (bool = false) { return false; }
Expand Down
4 changes: 0 additions & 4 deletions mythtv/libs/libmythui/platforms/mythdisplayx11.cpp
Expand Up @@ -21,10 +21,6 @@ MythDisplayX11::MythDisplayX11()
InitialiseModes();
}

MythDisplayX11::~MythDisplayX11()
{
}

bool MythDisplayX11::IsAvailable(void)
{
static bool s_checked = false;
Expand Down
2 changes: 1 addition & 1 deletion mythtv/libs/libmythui/platforms/mythdisplayx11.h
Expand Up @@ -8,7 +8,7 @@ class MythDisplayX11 : public MythDisplay
{
public:
MythDisplayX11();
~MythDisplayX11() override;
~MythDisplayX11() override = default;
static bool IsAvailable(void);
DisplayInfo GetDisplayInfo(int VideoRate = 0) override;

Expand Down

0 comments on commit 4bc7df4

Please sign in to comment.