clang-tidy: run modernize-use-equals-default
This commit is contained in:
parent
a60ed281a1
commit
26ebcdf9f5
|
@ -25,14 +25,14 @@
|
||||||
class ArchiveFile
|
class ArchiveFile
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~ArchiveFile() {}
|
virtual ~ArchiveFile() = default;
|
||||||
virtual u32 Read(void *buffer, u32 length) = 0;
|
virtual u32 Read(void *buffer, u32 length) = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Archive
|
class Archive
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~Archive() {}
|
virtual ~Archive() = default;
|
||||||
virtual ArchiveFile *OpenFile(const char *name) = 0;
|
virtual ArchiveFile *OpenFile(const char *name) = 0;
|
||||||
virtual ArchiveFile *OpenFileByCrc(u32 crc) = 0;
|
virtual ArchiveFile *OpenFileByCrc(u32 crc) = 0;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ namespace config {
|
||||||
|
|
||||||
class BaseOption {
|
class BaseOption {
|
||||||
public:
|
public:
|
||||||
virtual ~BaseOption() {}
|
virtual ~BaseOption() = default;
|
||||||
virtual void save() const = 0;
|
virtual void save() const = 0;
|
||||||
virtual void load() = 0;
|
virtual void load() = 0;
|
||||||
virtual void reset() = 0;
|
virtual void reset() = 0;
|
||||||
|
|
|
@ -72,7 +72,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EventManager() { }
|
EventManager() = default;
|
||||||
|
|
||||||
void registerEvent(Event event, Callback callback);
|
void registerEvent(Event event, Callback callback);
|
||||||
void unregisterEvent(Event event, Callback callback);
|
void unregisterEvent(Event event, Callback callback);
|
||||||
|
|
|
@ -26,7 +26,7 @@ extern TA_context* _pvrrc;
|
||||||
struct Renderer
|
struct Renderer
|
||||||
{
|
{
|
||||||
virtual bool Init()=0;
|
virtual bool Init()=0;
|
||||||
virtual ~Renderer() {}
|
virtual ~Renderer() = default;
|
||||||
|
|
||||||
virtual void Resize(int w, int h)=0;
|
virtual void Resize(int w, int h)=0;
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ template<typename nreg_t, typename nregf_t>
|
||||||
class RegAlloc
|
class RegAlloc
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RegAlloc() {}
|
RegAlloc() = default;
|
||||||
virtual ~RegAlloc() {}
|
virtual ~RegAlloc() = default;
|
||||||
|
|
||||||
void DoAlloc(RuntimeBlockInfo* block, const nreg_t* regs_avail, const nregf_t* regsf_avail)
|
void DoAlloc(RuntimeBlockInfo* block, const nreg_t* regs_avail, const nregf_t* regsf_avail)
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,7 +116,7 @@ struct Session
|
||||||
struct TrackFile
|
struct TrackFile
|
||||||
{
|
{
|
||||||
virtual void Read(u32 FAD,u8* dst,SectorFormat* sector_type,u8* subcode,SubcodeFormat* subcode_type)=0;
|
virtual void Read(u32 FAD,u8* dst,SectorFormat* sector_type,u8* subcode,SubcodeFormat* subcode_type)=0;
|
||||||
virtual ~TrackFile() {};
|
virtual ~TrackFile() = default;;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Track
|
struct Track
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
const std::string& unique_id() { return _unique_id; }
|
const std::string& unique_id() { return _unique_id; }
|
||||||
virtual bool gamepad_btn_input(u32 code, bool pressed);
|
virtual bool gamepad_btn_input(u32 code, bool pressed);
|
||||||
bool gamepad_axis_input(u32 code, int value);
|
bool gamepad_axis_input(u32 code, int value);
|
||||||
virtual ~GamepadDevice() {}
|
virtual ~GamepadDevice() = default;
|
||||||
|
|
||||||
virtual void detect_btn_input(input_detected_cb button_pressed);
|
virtual void detect_btn_input(input_detected_cb button_pressed);
|
||||||
void detect_axis_input(input_detected_cb axis_moved);
|
void detect_axis_input(input_detected_cb axis_moved);
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
int maple_port() { return _maple_port; }
|
int maple_port() { return _maple_port; }
|
||||||
void keyboard_character(char c);
|
void keyboard_character(char c);
|
||||||
std::string get_character_input();
|
std::string get_character_input();
|
||||||
virtual ~KeyboardDevice() {}
|
virtual ~KeyboardDevice() = default;
|
||||||
|
|
||||||
static KeyboardDevice *GetInstance() { return _instance; }
|
static KeyboardDevice *GetInstance() { return _instance; }
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
class InputMapping
|
class InputMapping
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InputMapping() {}
|
InputMapping() = default;
|
||||||
InputMapping(const InputMapping& other) {
|
InputMapping(const InputMapping& other) {
|
||||||
name = other.name;
|
name = other.name;
|
||||||
dead_zone = other.dead_zone;
|
dead_zone = other.dead_zone;
|
||||||
|
|
|
@ -7,13 +7,9 @@
|
||||||
|
|
||||||
#include "ConsoleListener.h"
|
#include "ConsoleListener.h"
|
||||||
|
|
||||||
ConsoleListener::ConsoleListener()
|
ConsoleListener::ConsoleListener() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
ConsoleListener::~ConsoleListener()
|
ConsoleListener::~ConsoleListener() = default;
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
|
void ConsoleListener::Log(LogTypes::LOG_LEVELS level, const char* text)
|
||||||
{
|
{
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
class LogListener
|
class LogListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual ~LogListener() {}
|
virtual ~LogListener() = default;
|
||||||
virtual void Log(LogTypes::LOG_LEVELS, const char* msg) = 0;
|
virtual void Log(LogTypes::LOG_LEVELS, const char* msg) = 0;
|
||||||
|
|
||||||
enum LISTENER
|
enum LISTENER
|
||||||
|
|
|
@ -735,7 +735,7 @@ public:
|
||||||
//true if : dirty or paletted texture and hashes don't match
|
//true if : dirty or paletted texture and hashes don't match
|
||||||
bool NeedsUpdate();
|
bool NeedsUpdate();
|
||||||
virtual bool Delete();
|
virtual bool Delete();
|
||||||
virtual ~BaseTextureCacheData() {}
|
virtual ~BaseTextureCacheData() = default;
|
||||||
static bool IsGpuHandledPaletted(TSP tsp, TCW tcw)
|
static bool IsGpuHandledPaletted(TSP tsp, TCW tcw)
|
||||||
{
|
{
|
||||||
// Some palette textures are handled on the GPU
|
// Some palette textures are handled on the GPU
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
#include "overlay.h"
|
#include "overlay.h"
|
||||||
#include "cfg/option.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)
|
std::unique_ptr<Texture> VulkanOverlay::createTexture(vk::CommandPool commandPool, int width, int height, u8 *data)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,7 +6,7 @@ class SDLKeyboardDevice : public KeyboardDeviceTemplate<SDL_Scancode>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SDLKeyboardDevice(int maple_port) : KeyboardDeviceTemplate(maple_port) {}
|
SDLKeyboardDevice(int maple_port) : KeyboardDeviceTemplate(maple_port) {}
|
||||||
virtual ~SDLKeyboardDevice() {}
|
virtual ~SDLKeyboardDevice() = default;
|
||||||
virtual const char* name() override { return "SDL Keyboard"; }
|
virtual const char* name() override { return "SDL Keyboard"; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -160,10 +160,7 @@ cResetEvent::cResetEvent() : state(false)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cResetEvent::~cResetEvent()
|
cResetEvent::~cResetEvent() = default;
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void cResetEvent::Set()//Signal
|
void cResetEvent::Set()//Signal
|
||||||
{
|
{
|
||||||
|
|
|
@ -240,7 +240,7 @@ public:
|
||||||
if (!find_mapping())
|
if (!find_mapping())
|
||||||
input_mapper = std::make_shared<KbInputMapping>();
|
input_mapper = std::make_shared<KbInputMapping>();
|
||||||
}
|
}
|
||||||
~WinKbGamepadDevice() override {}
|
~WinKbGamepadDevice() override = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MouseInputMapping : public InputMapping
|
class MouseInputMapping : public InputMapping
|
||||||
|
@ -267,7 +267,7 @@ public:
|
||||||
if (!find_mapping())
|
if (!find_mapping())
|
||||||
input_mapper = std::make_shared<MouseInputMapping>();
|
input_mapper = std::make_shared<MouseInputMapping>();
|
||||||
}
|
}
|
||||||
~WinMouseGamepadDevice() override {}
|
~WinMouseGamepadDevice() override = default;
|
||||||
|
|
||||||
bool gamepad_btn_input(u32 code, bool pressed) override
|
bool gamepad_btn_input(u32 code, bool pressed) override
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue