clang-tidy: run modernize-use-equals-default

This commit is contained in:
scribam 2021-03-14 18:52:04 +01:00
parent a60ed281a1
commit 26ebcdf9f5
16 changed files with 20 additions and 29 deletions

View File

@ -25,14 +25,14 @@
class ArchiveFile
{
public:
virtual ~ArchiveFile() {}
virtual ~ArchiveFile() = default;
virtual u32 Read(void *buffer, u32 length) = 0;
};
class Archive
{
public:
virtual ~Archive() {}
virtual ~Archive() = default;
virtual ArchiveFile *OpenFile(const char *name) = 0;
virtual ArchiveFile *OpenFileByCrc(u32 crc) = 0;

View File

@ -27,7 +27,7 @@ namespace config {
class BaseOption {
public:
virtual ~BaseOption() {}
virtual ~BaseOption() = default;
virtual void save() const = 0;
virtual void load() = 0;
virtual void reset() = 0;

View File

@ -72,7 +72,7 @@ public:
}
private:
EventManager() { }
EventManager() = default;
void registerEvent(Event event, Callback callback);
void unregisterEvent(Event event, Callback callback);

View File

@ -26,7 +26,7 @@ extern TA_context* _pvrrc;
struct Renderer
{
virtual bool Init()=0;
virtual ~Renderer() {}
virtual ~Renderer() = default;
virtual void Resize(int w, int h)=0;

View File

@ -32,8 +32,8 @@ template<typename nreg_t, typename nregf_t>
class RegAlloc
{
public:
RegAlloc() {}
virtual ~RegAlloc() {}
RegAlloc() = default;
virtual ~RegAlloc() = default;
void DoAlloc(RuntimeBlockInfo* block, const nreg_t* regs_avail, const nregf_t* regsf_avail)
{

View File

@ -116,7 +116,7 @@ struct Session
struct TrackFile
{
virtual void Read(u32 FAD,u8* dst,SectorFormat* sector_type,u8* subcode,SubcodeFormat* subcode_type)=0;
virtual ~TrackFile() {};
virtual ~TrackFile() = default;;
};
struct Track

View File

@ -38,7 +38,7 @@ public:
const std::string& unique_id() { return _unique_id; }
virtual bool gamepad_btn_input(u32 code, bool pressed);
bool gamepad_axis_input(u32 code, int value);
virtual ~GamepadDevice() {}
virtual ~GamepadDevice() = default;
virtual void detect_btn_input(input_detected_cb button_pressed);
void detect_axis_input(input_detected_cb axis_moved);

View File

@ -29,7 +29,7 @@ public:
int maple_port() { return _maple_port; }
void keyboard_character(char c);
std::string get_character_input();
virtual ~KeyboardDevice() {}
virtual ~KeyboardDevice() = default;
static KeyboardDevice *GetInstance() { return _instance; }

View File

@ -27,7 +27,7 @@
class InputMapping
{
public:
InputMapping() {}
InputMapping() = default;
InputMapping(const InputMapping& other) {
name = other.name;
dead_zone = other.dead_zone;

View File

@ -7,13 +7,9 @@
#include "ConsoleListener.h"
ConsoleListener::ConsoleListener()
{
}
ConsoleListener::ConsoleListener() = default;
ConsoleListener::~ConsoleListener()
{
}
ConsoleListener::~ConsoleListener() = default;
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
{

View File

@ -14,7 +14,7 @@
class LogListener
{
public:
virtual ~LogListener() {}
virtual ~LogListener() = default;
virtual void Log(LogTypes::LOG_LEVELS, const char* msg) = 0;
enum LISTENER

View File

@ -735,7 +735,7 @@ public:
//true if : dirty or paletted texture and hashes don't match
bool NeedsUpdate();
virtual bool Delete();
virtual ~BaseTextureCacheData() {}
virtual ~BaseTextureCacheData() = default;
static bool IsGpuHandledPaletted(TSP tsp, TCW tcw)
{
// Some palette textures are handled on the GPU

View File

@ -24,9 +24,7 @@
#include "overlay.h"
#include "cfg/option.h"
VulkanOverlay::~VulkanOverlay()
{
}
VulkanOverlay::~VulkanOverlay() = default;
std::unique_ptr<Texture> VulkanOverlay::createTexture(vk::CommandPool commandPool, int width, int height, u8 *data)
{

View File

@ -6,7 +6,7 @@ class SDLKeyboardDevice : public KeyboardDeviceTemplate<SDL_Scancode>
{
public:
SDLKeyboardDevice(int maple_port) : KeyboardDeviceTemplate(maple_port) {}
virtual ~SDLKeyboardDevice() {}
virtual ~SDLKeyboardDevice() = default;
virtual const char* name() override { return "SDL Keyboard"; }
protected:

View File

@ -160,10 +160,7 @@ cResetEvent::cResetEvent() : state(false)
}
cResetEvent::~cResetEvent()
{
}
cResetEvent::~cResetEvent() = default;
void cResetEvent::Set()//Signal
{

View File

@ -240,7 +240,7 @@ public:
if (!find_mapping())
input_mapper = std::make_shared<KbInputMapping>();
}
~WinKbGamepadDevice() override {}
~WinKbGamepadDevice() override = default;
};
class MouseInputMapping : public InputMapping
@ -267,7 +267,7 @@ public:
if (!find_mapping())
input_mapper = std::make_shared<MouseInputMapping>();
}
~WinMouseGamepadDevice() override {}
~WinMouseGamepadDevice() override = default;
bool gamepad_btn_input(u32 code, bool pressed) override
{