diff --git a/core/archive/archive.h b/core/archive/archive.h index 29560f3ef..effba1c2b 100644 --- a/core/archive/archive.h +++ b/core/archive/archive.h @@ -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; diff --git a/core/cfg/option.h b/core/cfg/option.h index d3316e159..2de22ccd4 100644 --- a/core/cfg/option.h +++ b/core/cfg/option.h @@ -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; diff --git a/core/emulator.h b/core/emulator.h index 436c79d4a..3ea635c7c 100644 --- a/core/emulator.h +++ b/core/emulator.h @@ -72,7 +72,7 @@ public: } private: - EventManager() { } + EventManager() = default; void registerEvent(Event event, Callback callback); void unregisterEvent(Event event, Callback callback); diff --git a/core/hw/pvr/Renderer_if.h b/core/hw/pvr/Renderer_if.h index ec750a3e5..9b9d80615 100644 --- a/core/hw/pvr/Renderer_if.h +++ b/core/hw/pvr/Renderer_if.h @@ -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; diff --git a/core/hw/sh4/dyna/ssa_regalloc.h b/core/hw/sh4/dyna/ssa_regalloc.h index b17a3b896..a9ee498e4 100644 --- a/core/hw/sh4/dyna/ssa_regalloc.h +++ b/core/hw/sh4/dyna/ssa_regalloc.h @@ -32,8 +32,8 @@ template 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) { diff --git a/core/imgread/common.h b/core/imgread/common.h index fbc146c15..eebbc0a19 100644 --- a/core/imgread/common.h +++ b/core/imgread/common.h @@ -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 diff --git a/core/input/gamepad_device.h b/core/input/gamepad_device.h index 5b225137b..7304876d3 100644 --- a/core/input/gamepad_device.h +++ b/core/input/gamepad_device.h @@ -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); diff --git a/core/input/keyboard_device.h b/core/input/keyboard_device.h index 0f004040a..1661f4014 100644 --- a/core/input/keyboard_device.h +++ b/core/input/keyboard_device.h @@ -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; } diff --git a/core/input/mapping.h b/core/input/mapping.h index 95fd773e5..9d0163a87 100644 --- a/core/input/mapping.h +++ b/core/input/mapping.h @@ -27,7 +27,7 @@ class InputMapping { public: - InputMapping() {} + InputMapping() = default; InputMapping(const InputMapping& other) { name = other.name; dead_zone = other.dead_zone; diff --git a/core/log/ConsoleListenerWin.cpp b/core/log/ConsoleListenerWin.cpp index dbf326f0a..a50b95477 100644 --- a/core/log/ConsoleListenerWin.cpp +++ b/core/log/ConsoleListenerWin.cpp @@ -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) { diff --git a/core/log/LogManager.h b/core/log/LogManager.h index dda1acbfa..a3c46b1cd 100644 --- a/core/log/LogManager.h +++ b/core/log/LogManager.h @@ -14,7 +14,7 @@ class LogListener { public: - virtual ~LogListener() {} + virtual ~LogListener() = default; virtual void Log(LogTypes::LOG_LEVELS, const char* msg) = 0; enum LISTENER diff --git a/core/rend/TexCache.h b/core/rend/TexCache.h index 5c9934400..79bfd3e3a 100644 --- a/core/rend/TexCache.h +++ b/core/rend/TexCache.h @@ -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 diff --git a/core/rend/vulkan/overlay.cpp b/core/rend/vulkan/overlay.cpp index e09a38e60..94209263e 100644 --- a/core/rend/vulkan/overlay.cpp +++ b/core/rend/vulkan/overlay.cpp @@ -24,9 +24,7 @@ #include "overlay.h" #include "cfg/option.h" -VulkanOverlay::~VulkanOverlay() -{ -} +VulkanOverlay::~VulkanOverlay() = default; std::unique_ptr VulkanOverlay::createTexture(vk::CommandPool commandPool, int width, int height, u8 *data) { diff --git a/core/sdl/sdl_keyboard.h b/core/sdl/sdl_keyboard.h index 252258a89..acd6972e8 100644 --- a/core/sdl/sdl_keyboard.h +++ b/core/sdl/sdl_keyboard.h @@ -6,7 +6,7 @@ class SDLKeyboardDevice : public KeyboardDeviceTemplate { public: SDLKeyboardDevice(int maple_port) : KeyboardDeviceTemplate(maple_port) {} - virtual ~SDLKeyboardDevice() {} + virtual ~SDLKeyboardDevice() = default; virtual const char* name() override { return "SDL Keyboard"; } protected: diff --git a/core/stdclass.cpp b/core/stdclass.cpp index c34628ac2..867a8dc85 100644 --- a/core/stdclass.cpp +++ b/core/stdclass.cpp @@ -160,10 +160,7 @@ cResetEvent::cResetEvent() : state(false) } -cResetEvent::~cResetEvent() -{ - -} +cResetEvent::~cResetEvent() = default; void cResetEvent::Set()//Signal { diff --git a/core/windows/xinput_gamepad.h b/core/windows/xinput_gamepad.h index 10b33b46d..6c5a8e771 100644 --- a/core/windows/xinput_gamepad.h +++ b/core/windows/xinput_gamepad.h @@ -240,7 +240,7 @@ public: if (!find_mapping()) input_mapper = std::make_shared(); } - ~WinKbGamepadDevice() override {} + ~WinKbGamepadDevice() override = default; }; class MouseInputMapping : public InputMapping @@ -267,7 +267,7 @@ public: if (!find_mapping()) input_mapper = std::make_shared(); } - ~WinMouseGamepadDevice() override {} + ~WinMouseGamepadDevice() override = default; bool gamepad_btn_input(u32 code, bool pressed) override {