mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #13522 from tygyh/Enforce-overriding-destructor-style-Core&UnitTests
Core & UnitTests: Make overriding explicit and remove redundant virtual specifiers on overriding destructors
This commit is contained in:
@@ -32,7 +32,7 @@ class WASAPIStream final : public SoundStream
|
||||
#ifdef _WIN32
|
||||
public:
|
||||
explicit WASAPIStream();
|
||||
~WASAPIStream();
|
||||
~WASAPIStream() override;
|
||||
bool Init() override;
|
||||
bool SetRunning(bool running) override;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
{
|
||||
m_active_block = &m_output_result.blocks.emplace_back(base_addr);
|
||||
}
|
||||
virtual ~GekkoIRPlugin() = default;
|
||||
~GekkoIRPlugin() override = default;
|
||||
|
||||
void OnDirectivePre(GekkoDirective directive) override;
|
||||
void OnDirectivePost(GekkoDirective directive) override;
|
||||
|
||||
@@ -46,8 +46,7 @@ public:
|
||||
ASSERT(!mbedtls_aes_setkey_dec(&ctx, key, 128));
|
||||
}
|
||||
|
||||
virtual bool Crypt(const u8* iv, u8* iv_out, const u8* buf_in, u8* buf_out,
|
||||
size_t len) const override
|
||||
bool Crypt(const u8* iv, u8* iv_out, const u8* buf_in, u8* buf_out, size_t len) const override
|
||||
{
|
||||
std::array<u8, BLOCK_SIZE> iv_tmp{};
|
||||
if (iv)
|
||||
@@ -206,8 +205,7 @@ public:
|
||||
_mm_storeu_si128(&((__m128i*)buf_out)[d], block[d]);
|
||||
}
|
||||
|
||||
virtual bool Crypt(const u8* iv, u8* iv_out, const u8* buf_in, u8* buf_out,
|
||||
size_t len) const override
|
||||
bool Crypt(const u8* iv, u8* iv_out, const u8* buf_in, u8* buf_out, size_t len) const override
|
||||
{
|
||||
if (len % BLOCK_SIZE)
|
||||
return false;
|
||||
|
||||
@@ -41,18 +41,18 @@ public:
|
||||
mbedtls_sha1_init(&ctx);
|
||||
ASSERT(!mbedtls_sha1_starts_ret(&ctx));
|
||||
}
|
||||
~ContextMbed() { mbedtls_sha1_free(&ctx); }
|
||||
virtual void Update(const u8* msg, size_t len) override
|
||||
~ContextMbed() override { mbedtls_sha1_free(&ctx); }
|
||||
void Update(const u8* msg, size_t len) override
|
||||
{
|
||||
ASSERT(!mbedtls_sha1_update_ret(&ctx, msg, len));
|
||||
}
|
||||
virtual Digest Finish() override
|
||||
Digest Finish() override
|
||||
{
|
||||
Digest digest;
|
||||
ASSERT(!mbedtls_sha1_finish_ret(&ctx, digest.data()));
|
||||
return digest;
|
||||
}
|
||||
virtual bool HwAccelerated() const override { return false; }
|
||||
bool HwAccelerated() const override { return false; }
|
||||
|
||||
private:
|
||||
mbedtls_sha1_context ctx{};
|
||||
@@ -204,7 +204,7 @@ private:
|
||||
}
|
||||
|
||||
ATTRIBUTE_TARGET("sha")
|
||||
virtual void ProcessBlock(const u8* msg) override
|
||||
void ProcessBlock(const u8* msg) override
|
||||
{
|
||||
// There are 80 rounds with 4 bytes per round, giving 0x140 byte work space, but we can keep
|
||||
// active state in just 0x40 bytes.
|
||||
@@ -248,7 +248,7 @@ private:
|
||||
// clang-format on
|
||||
}
|
||||
|
||||
virtual Digest GetDigest() override
|
||||
Digest GetDigest() override
|
||||
{
|
||||
Digest digest;
|
||||
_mm_storeu_si128((__m128i*)&digest[0], byterev_16B(state[0]));
|
||||
@@ -257,7 +257,7 @@ private:
|
||||
return digest;
|
||||
}
|
||||
|
||||
virtual bool HwAccelerated() const override { return true; }
|
||||
bool HwAccelerated() const override { return true; }
|
||||
|
||||
std::array<XmmReg, 2> state{};
|
||||
};
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
class GLContextWGL final : public GLContext
|
||||
{
|
||||
public:
|
||||
~GLContextWGL();
|
||||
~GLContextWGL() override;
|
||||
|
||||
bool IsHeadless() const;
|
||||
bool IsHeadless() const override;
|
||||
|
||||
std::unique_ptr<GLContext> CreateSharedContext() override;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ class HostDisassemblerBochs final : public HostDisassembler
|
||||
{
|
||||
public:
|
||||
explicit HostDisassemblerBochs();
|
||||
~HostDisassemblerBochs() = default;
|
||||
~HostDisassemblerBochs() override = default;
|
||||
|
||||
private:
|
||||
disassembler m_disasm;
|
||||
|
||||
@@ -9,7 +9,7 @@ class ConsoleListener : public Common::Log::LogListener
|
||||
{
|
||||
public:
|
||||
ConsoleListener();
|
||||
~ConsoleListener();
|
||||
~ConsoleListener() override;
|
||||
|
||||
void Log(Common::Log::LogLevel level, const char* text) override;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ public:
|
||||
explicit DolReader(const std::string& filename);
|
||||
explicit DolReader(File::IOFile file);
|
||||
explicit DolReader(std::vector<u8> buffer);
|
||||
~DolReader();
|
||||
~DolReader() override;
|
||||
|
||||
bool IsValid() const override { return m_is_valid; }
|
||||
bool IsWii() const override { return m_is_wii; }
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
explicit ElfReader(const std::string& filename);
|
||||
explicit ElfReader(File::IOFile file);
|
||||
explicit ElfReader(std::vector<u8> buffer);
|
||||
~ElfReader();
|
||||
~ElfReader() override;
|
||||
u32 Read32(int off) const { return base32[off >> 2]; }
|
||||
// Quick accessors
|
||||
ElfType GetType() const { return (ElfType)(header->e_type); }
|
||||
|
||||
@@ -132,7 +132,7 @@ class OSThreadView : public Common::Debug::ThreadView
|
||||
{
|
||||
public:
|
||||
explicit OSThreadView(const Core::CPUThreadGuard& guard, u32 addr);
|
||||
~OSThreadView() = default;
|
||||
~OSThreadView() override = default;
|
||||
|
||||
const OSThread& Data() const;
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@ class FifoPlayer::CPUCore final : public CPUCoreBase
|
||||
public:
|
||||
explicit CPUCore(FifoPlayer* parent) : m_parent(parent) {}
|
||||
CPUCore(const CPUCore&) = delete;
|
||||
~CPUCore() {}
|
||||
~CPUCore() override {}
|
||||
CPUCore& operator=(const CPUCore&) = delete;
|
||||
|
||||
void Init() override
|
||||
|
||||
@@ -157,7 +157,7 @@ class VAListStruct : public VAList
|
||||
{
|
||||
public:
|
||||
explicit VAListStruct(const Core::CPUThreadGuard& guard, u32 address);
|
||||
~VAListStruct() = default;
|
||||
~VAListStruct() override = default;
|
||||
|
||||
private:
|
||||
struct svr4_va_list
|
||||
|
||||
@@ -28,7 +28,7 @@ public:
|
||||
DSPHLE(DSPHLE&& other) = delete;
|
||||
DSPHLE& operator=(const DSPHLE& other) = delete;
|
||||
DSPHLE& operator=(DSPHLE&& other) = delete;
|
||||
~DSPHLE();
|
||||
~DSPHLE() override;
|
||||
|
||||
bool Initialize(bool wii, bool dsp_thread) override;
|
||||
void Shutdown() override;
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
AESndAccelerator(AESndAccelerator&&) = delete;
|
||||
AESndAccelerator& operator=(const AESndAccelerator&) = delete;
|
||||
AESndAccelerator& operator=(AESndAccelerator&&) = delete;
|
||||
~AESndAccelerator();
|
||||
~AESndAccelerator() override;
|
||||
|
||||
protected:
|
||||
void OnRawReadEndException() override {}
|
||||
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
HLEAccelerator(HLEAccelerator&&) = delete;
|
||||
HLEAccelerator& operator=(const HLEAccelerator&) = delete;
|
||||
HLEAccelerator& operator=(HLEAccelerator&&) = delete;
|
||||
~HLEAccelerator() = default;
|
||||
~HLEAccelerator() override = default;
|
||||
|
||||
PB_TYPE* acc_pb = nullptr;
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class DSPLLE : public DSPEmulator
|
||||
{
|
||||
public:
|
||||
DSPLLE();
|
||||
~DSPLLE();
|
||||
~DSPLLE() override;
|
||||
|
||||
bool Initialize(bool wii, bool dsp_thread) override;
|
||||
void Shutdown() override;
|
||||
|
||||
@@ -18,7 +18,7 @@ class CEXIAgp : public IEXIDevice
|
||||
{
|
||||
public:
|
||||
CEXIAgp(Core::System& system, const Slot slot);
|
||||
virtual ~CEXIAgp() override;
|
||||
~CEXIAgp() override;
|
||||
bool IsPresent() const override { return true; }
|
||||
void ImmWrite(u32 _uData, u32 _uSize) override;
|
||||
u32 ImmRead(u32 _uSize) override;
|
||||
|
||||
@@ -216,7 +216,7 @@ class CEXIETHERNET : public IEXIDevice
|
||||
{
|
||||
public:
|
||||
CEXIETHERNET(Core::System& system, BBADeviceType type);
|
||||
virtual ~CEXIETHERNET();
|
||||
~CEXIETHERNET() override;
|
||||
void SetCS(int cs) override;
|
||||
bool IsPresent() const override;
|
||||
bool IsInterruptSet() override;
|
||||
|
||||
@@ -18,7 +18,7 @@ class CEXIMic : public IEXIDevice
|
||||
{
|
||||
public:
|
||||
CEXIMic(Core::System& system, const int index);
|
||||
virtual ~CEXIMic();
|
||||
~CEXIMic() override;
|
||||
void SetCS(int cs) override;
|
||||
bool IsInterruptSet() override;
|
||||
bool IsPresent() const override;
|
||||
|
||||
@@ -33,7 +33,7 @@ class CEXIModem : public IEXIDevice
|
||||
{
|
||||
public:
|
||||
CEXIModem(Core::System& system, ModemDeviceType type);
|
||||
virtual ~CEXIModem();
|
||||
~CEXIModem() override;
|
||||
void SetCS(int cs) override;
|
||||
bool IsPresent() const override;
|
||||
bool IsInterruptSet() override;
|
||||
@@ -136,13 +136,13 @@ private:
|
||||
TAPServerNetworkInterface(CEXIModem* modem_ref, const std::string& destination);
|
||||
|
||||
public:
|
||||
virtual bool Activate() override;
|
||||
virtual void Deactivate() override;
|
||||
virtual bool IsActivated() override;
|
||||
virtual bool SendAndRemoveAllHDLCFrames(std::string* send_buffer) override;
|
||||
virtual bool RecvInit() override;
|
||||
virtual void RecvStart() override;
|
||||
virtual void RecvStop() override;
|
||||
bool Activate() override;
|
||||
void Deactivate() override;
|
||||
bool IsActivated() override;
|
||||
bool SendAndRemoveAllHDLCFrames(std::string* send_buffer) override;
|
||||
bool RecvInit() override;
|
||||
void RecvStart() override;
|
||||
void RecvStop() override;
|
||||
|
||||
private:
|
||||
TAPServerConnection m_tapserver_if;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user