Skip to content
Permalink
Browse files

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.
  • Loading branch information...
lioncash committed Jul 8, 2019
1 parent bc87782 commit b1b9c6aa1e8c04a89f2d6e08960e67665bcabda2
@@ -18,7 +18,7 @@ namespace Common
class DebugInterface
{
protected:
virtual ~DebugInterface() {}
virtual ~DebugInterface() = default;

public:
// Watches
@@ -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));
@@ -20,7 +20,9 @@ class PPCPatches : public Common::Debug::MemoryPatches
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;
@@ -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));
@@ -21,7 +21,9 @@ class DSPPatches : public Common::Debug::MemoryPatches
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;

0 comments on commit b1b9c6a

Please sign in to comment.
You can’t perform that action at this time.