Common/DebugInterface: Default virtual destructor

While we're at it, we can also default the constructor and destructor of
inheriting classes in their respective cpp file to prevent the
construction and destruction of non-trivial types being inlined into
other regions of code.
This commit is contained in:
Lioncash 2019-07-08 17:44:56 -04:00
parent bc8778203e
commit b1b9c6aa1e
5 changed files with 13 additions and 3 deletions

View file

@ -18,7 +18,7 @@ namespace Common
class DebugInterface
{
protected:
virtual ~DebugInterface() {}
virtual ~DebugInterface() = default;
public:
// Watches

View file

@ -44,6 +44,9 @@ void PPCPatches::Patch(std::size_t index)
}
}
PPCDebugInterface::PPCDebugInterface() = default;
PPCDebugInterface::~PPCDebugInterface() = default;
std::size_t PPCDebugInterface::SetWatch(u32 address, std::string name)
{
return m_watches.SetWatch(address, std::move(name));

View file

@ -20,7 +20,9 @@ private:
class PPCDebugInterface final : public Common::DebugInterface
{
public:
PPCDebugInterface() {}
PPCDebugInterface();
~PPCDebugInterface() override;
// Watches
std::size_t SetWatch(u32 address, std::string name = "") override;
const Common::Debug::Watch& GetWatch(std::size_t index) const override;

View file

@ -20,6 +20,9 @@ void DSPPatches::Patch(std::size_t index)
PanicAlert("Patch functionality not supported in DSP module.");
}
DSPDebugInterface::DSPDebugInterface() = default;
DSPDebugInterface::~DSPDebugInterface() = default;
std::size_t DSPDebugInterface::SetWatch(u32 address, std::string name)
{
return m_watches.SetWatch(address, std::move(name));

View file

@ -21,7 +21,9 @@ private:
class DSPDebugInterface final : public Common::DebugInterface
{
public:
DSPDebugInterface() {}
DSPDebugInterface();
~DSPDebugInterface() override;
// Watches
std::size_t SetWatch(u32 address, std::string name = "") override;
const Common::Debug::Watch& GetWatch(std::size_t index) const override;