diff --git a/Activity/Observer.hpp b/Activity/Observer.hpp index 9ed8f4583..346219b70 100644 --- a/Activity/Observer.hpp +++ b/Activity/Observer.hpp @@ -23,7 +23,7 @@ namespace Activity { */ class Observer { public: - virtual ~Observer() {} + virtual ~Observer() = default; /// Provides hints as to the sort of information presented on an LED. enum LEDPresentation: uint8_t { diff --git a/Analyser/Static/StaticAnalyser.hpp b/Analyser/Static/StaticAnalyser.hpp index 05aedfa64..8e8a1648a 100644 --- a/Analyser/Static/StaticAnalyser.hpp +++ b/Analyser/Static/StaticAnalyser.hpp @@ -57,7 +57,7 @@ struct Media { */ struct Target { Target(Machine machine) : machine(machine) {} - virtual ~Target() {} + virtual ~Target() = default; // This field is entirely optional. std::unique_ptr state; diff --git a/Components/1770/1770.hpp b/Components/1770/1770.hpp index 6a6833f04..23f9a2a82 100644 --- a/Components/1770/1770.hpp +++ b/Components/1770/1770.hpp @@ -30,7 +30,7 @@ class WD1770: public Storage::Disk::MFMController { @param p The type of controller to emulate. */ WD1770(Personality p); - virtual ~WD1770() {} + virtual ~WD1770() = default; /// Sets the value of the double-density input; when @c is_double_density is @c true, reads and writes double-density format data. using Storage::Disk::MFMController::set_is_double_density; diff --git a/Components/8272/i8272.hpp b/Components/8272/i8272.hpp index 314482895..6f4fd1d3a 100644 --- a/Components/8272/i8272.hpp +++ b/Components/8272/i8272.hpp @@ -21,7 +21,7 @@ namespace Intel::i8272 { class BusHandler { public: - virtual ~BusHandler() {} + virtual ~BusHandler() = default; virtual void set_dma_data_request([[maybe_unused]] bool drq) {} virtual void set_interrupt([[maybe_unused]] bool irq) {} }; diff --git a/Components/9918/Implementation/YamahaCommands.hpp b/Components/9918/Implementation/YamahaCommands.hpp index 30c4e1fdb..4a42b9dfa 100644 --- a/Components/9918/Implementation/YamahaCommands.hpp +++ b/Components/9918/Implementation/YamahaCommands.hpp @@ -132,7 +132,7 @@ struct Command { CommandContext &context; ModeDescription &mode_description; Command(CommandContext &context, ModeDescription &mode_description) : context(context), mode_description(mode_description) {} - virtual ~Command() {} + virtual ~Command() = default; /// @returns @c true if all output from this command is done; @c false otherwise. virtual bool done() = 0; diff --git a/Components/AppleClock/AppleClock.hpp b/Components/AppleClock/AppleClock.hpp index 5a45d4179..ab2ec04c4 100644 --- a/Components/AppleClock/AppleClock.hpp +++ b/Components/AppleClock/AppleClock.hpp @@ -21,8 +21,6 @@ namespace Apple::Clock { */ class ClockStorage { public: - ClockStorage() {} - /*! Advances the clock by 1 second. diff --git a/Inputs/Joystick.hpp b/Inputs/Joystick.hpp index 9460568d8..064baf092 100644 --- a/Inputs/Joystick.hpp +++ b/Inputs/Joystick.hpp @@ -19,7 +19,7 @@ namespace Inputs { */ class Joystick { public: - virtual ~Joystick() {} + virtual ~Joystick() = default; /*! Defines a single input, any individually-measured thing — a fire button or diff --git a/Inputs/Keyboard.hpp b/Inputs/Keyboard.hpp index 8b86fac7f..ad00c1b05 100644 --- a/Inputs/Keyboard.hpp +++ b/Inputs/Keyboard.hpp @@ -45,7 +45,7 @@ class Keyboard { /// Constructs a Keyboard that declares itself to observe only members of @c observed_keys. Keyboard(const std::set &observed_keys, const std::set &essential_modifiers); - virtual ~Keyboard() {} + virtual ~Keyboard() = default; // Host interface. diff --git a/InstructionSets/M50740/Instruction.hpp b/InstructionSets/M50740/Instruction.hpp index b61f2c17e..2b7d3138e 100644 --- a/InstructionSets/M50740/Instruction.hpp +++ b/InstructionSets/M50740/Instruction.hpp @@ -222,7 +222,7 @@ struct Instruction { Instruction(Operation operation, AddressingMode addressing_mode, uint8_t opcode) : operation(operation), addressing_mode(addressing_mode), opcode(opcode) {} Instruction(uint8_t opcode) : opcode(opcode) {} - Instruction() {} + Instruction() = default; }; /*! diff --git a/InstructionSets/M68k/Instruction.hpp b/InstructionSets/M68k/Instruction.hpp index b5e601930..8428a2898 100644 --- a/InstructionSets/M68k/Instruction.hpp +++ b/InstructionSets/M68k/Instruction.hpp @@ -478,7 +478,7 @@ class Preinstruction { static constexpr int SizeShift = 0; }; - Preinstruction() {} + Preinstruction() = default; /// Produces a string description of this instruction; if @c opcode /// is supplied then any quick fields in this instruction will be decoded; diff --git a/Machines/Amiga/Amiga.cpp b/Machines/Amiga/Amiga.cpp index 834ec0058..f0fa4a2fe 100644 --- a/Machines/Amiga/Amiga.cpp +++ b/Machines/Amiga/Amiga.cpp @@ -256,5 +256,3 @@ std::unique_ptr Machine::Amiga(const Analyser::Static::Target *target, const Target *const amiga_target = dynamic_cast(target); return std::make_unique(*amiga_target, rom_fetcher); } - -Machine::~Machine() {} diff --git a/Machines/Amiga/Amiga.hpp b/Machines/Amiga/Amiga.hpp index f0b6cd4d5..7e24b4e5b 100644 --- a/Machines/Amiga/Amiga.hpp +++ b/Machines/Amiga/Amiga.hpp @@ -17,7 +17,7 @@ namespace Amiga { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an Amiga. static std::unique_ptr Amiga(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Amiga/Blitter.hpp b/Machines/Amiga/Blitter.hpp index b3db330af..232428385 100644 --- a/Machines/Amiga/Blitter.hpp +++ b/Machines/Amiga/Blitter.hpp @@ -62,7 +62,7 @@ template class Blitter: public DMADevice<4, 4> { uint32_t address = 0; uint16_t value = 0; - Transaction() {} + Transaction() = default; Transaction(Type type) : type(type) {} Transaction(Type type, uint32_t address, uint16_t value) : type(type), address(address), value(value) {} diff --git a/Machines/AmstradCPC/AmstradCPC.cpp b/Machines/AmstradCPC/AmstradCPC.cpp index ce15aae9b..e38d870ca 100644 --- a/Machines/AmstradCPC/AmstradCPC.cpp +++ b/Machines/AmstradCPC/AmstradCPC.cpp @@ -1293,5 +1293,3 @@ std::unique_ptr Machine::AmstradCPC(const Analyser::Static::Target *tar case Target::Model::CPC464: return std::make_unique>(*cpc_target, rom_fetcher); } } - -Machine::~Machine() {} diff --git a/Machines/AmstradCPC/AmstradCPC.hpp b/Machines/AmstradCPC/AmstradCPC.hpp index 75cf8af6c..33304eeb0 100644 --- a/Machines/AmstradCPC/AmstradCPC.hpp +++ b/Machines/AmstradCPC/AmstradCPC.hpp @@ -22,7 +22,7 @@ namespace AmstradCPC { */ class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an Amstrad CPC. static std::unique_ptr AmstradCPC(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Apple/ADB/Bus.hpp b/Machines/Apple/ADB/Bus.hpp index 89cc02c83..4da64f4f1 100644 --- a/Machines/Apple/ADB/Bus.hpp +++ b/Machines/Apple/ADB/Bus.hpp @@ -34,7 +34,7 @@ struct Command { uint8_t device = AllDevices; uint8_t reg = NoRegister; - Command() {} + Command() = default; Command(Type type) : type(type) {} Command(Type type, uint8_t device) : type(type), device(device) {} Command(Type type, uint8_t device, uint8_t reg) : type(type), device(device), reg(reg) {} diff --git a/Machines/Apple/AppleII/AppleII.cpp b/Machines/Apple/AppleII/AppleII.cpp index 4ca222a3d..b322e8960 100644 --- a/Machines/Apple/AppleII/AppleII.cpp +++ b/Machines/Apple/AppleII/AppleII.cpp @@ -1107,5 +1107,3 @@ std::unique_ptr Machine::AppleII(const Analyser::Static::Target *target } } } - -Machine::~Machine() {} diff --git a/Machines/Apple/AppleII/AppleII.hpp b/Machines/Apple/AppleII/AppleII.hpp index 047fa7552..fb569118a 100644 --- a/Machines/Apple/AppleII/AppleII.hpp +++ b/Machines/Apple/AppleII/AppleII.hpp @@ -19,7 +19,7 @@ namespace Apple::II { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an AppleII. static std::unique_ptr AppleII(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.cpp b/Machines/Apple/AppleIIgs/AppleIIgs.cpp index 48558ba78..a0c4ac564 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.cpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.cpp @@ -1013,6 +1013,3 @@ using namespace Apple::IIgs; std::unique_ptr Machine::AppleIIgs(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher) { return std::make_unique(*dynamic_cast(target), rom_fetcher); } - -Machine::~Machine() {} - diff --git a/Machines/Apple/AppleIIgs/AppleIIgs.hpp b/Machines/Apple/AppleIIgs/AppleIIgs.hpp index 252ed1e1a..841d1fbf6 100644 --- a/Machines/Apple/AppleIIgs/AppleIIgs.hpp +++ b/Machines/Apple/AppleIIgs/AppleIIgs.hpp @@ -19,7 +19,7 @@ namespace Apple::IIgs { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an AppleIIgs. static std::unique_ptr AppleIIgs(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Apple/Macintosh/Macintosh.cpp b/Machines/Apple/Macintosh/Macintosh.cpp index fd161b3a6..35424a2f3 100644 --- a/Machines/Apple/Macintosh/Macintosh.cpp +++ b/Machines/Apple/Macintosh/Macintosh.cpp @@ -852,5 +852,3 @@ std::unique_ptr Machine::Macintosh(const Analyser::Static::Target *targ case Model::MacPlus: return std::make_unique>(*mac_target, rom_fetcher); } } - -Machine::~Machine() {} diff --git a/Machines/Apple/Macintosh/Macintosh.hpp b/Machines/Apple/Macintosh/Macintosh.hpp index d2b654690..a2553bbfe 100644 --- a/Machines/Apple/Macintosh/Macintosh.hpp +++ b/Machines/Apple/Macintosh/Macintosh.hpp @@ -17,7 +17,7 @@ namespace Apple::Macintosh { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns a Macintosh. static std::unique_ptr Macintosh(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Atari/2600/Atari2600.cpp b/Machines/Atari/2600/Atari2600.cpp index fb146400d..030a835e4 100644 --- a/Machines/Atari/2600/Atari2600.cpp +++ b/Machines/Atari/2600/Atari2600.cpp @@ -216,5 +216,3 @@ std::unique_ptr Machine::Atari2600(const Analyser::Static::Target *targ const Target *const atari_target = dynamic_cast(target); return std::make_unique(*atari_target); } - -Machine::~Machine() {} diff --git a/Machines/Atari/2600/Atari2600.hpp b/Machines/Atari/2600/Atari2600.hpp index 4c39051a9..a4391aaf4 100644 --- a/Machines/Atari/2600/Atari2600.hpp +++ b/Machines/Atari/2600/Atari2600.hpp @@ -23,7 +23,7 @@ namespace Atari2600 { */ class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an Atari 2600 on the heap. static std::unique_ptr Atari2600(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Atari/ST/AtariST.cpp b/Machines/Atari/ST/AtariST.cpp index bab80e959..7c39e28bc 100644 --- a/Machines/Atari/ST/AtariST.cpp +++ b/Machines/Atari/ST/AtariST.cpp @@ -717,5 +717,3 @@ std::unique_ptr Machine::AtariST(const Analyser::Static::Target *target return std::make_unique(*atari_target, rom_fetcher); } - -Machine::~Machine() {} diff --git a/Machines/Atari/ST/AtariST.hpp b/Machines/Atari/ST/AtariST.hpp index bdfff3bd2..88d782c03 100644 --- a/Machines/Atari/ST/AtariST.hpp +++ b/Machines/Atari/ST/AtariST.hpp @@ -19,7 +19,7 @@ namespace Atari::ST { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr AtariST(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/ColecoVision/ColecoVision.cpp b/Machines/ColecoVision/ColecoVision.cpp index 2ee9da78d..730624697 100644 --- a/Machines/ColecoVision/ColecoVision.cpp +++ b/Machines/ColecoVision/ColecoVision.cpp @@ -415,5 +415,3 @@ using namespace Coleco::Vision; std::unique_ptr Machine::ColecoVision(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher) { return std::make_unique(*target, rom_fetcher); } - -Machine::~Machine() {} diff --git a/Machines/ColecoVision/ColecoVision.hpp b/Machines/ColecoVision/ColecoVision.hpp index b8b8609b2..85a816460 100644 --- a/Machines/ColecoVision/ColecoVision.hpp +++ b/Machines/ColecoVision/ColecoVision.hpp @@ -19,7 +19,7 @@ namespace Coleco::Vision { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr ColecoVision(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); class Options: public Reflection::StructImpl, public Configurable::DisplayOption { diff --git a/Machines/Commodore/SerialBus.hpp b/Machines/Commodore/SerialBus.hpp index 2e7b1fd7e..0b4640c7b 100644 --- a/Machines/Commodore/SerialBus.hpp +++ b/Machines/Commodore/SerialBus.hpp @@ -73,7 +73,7 @@ namespace Commodore::Serial { class Port { public: Port() : line_levels_{High, High, High, High, High} {} - virtual ~Port() {} + virtual ~Port() = default; /*! Sets the current level of an output line on this serial port. diff --git a/Machines/Commodore/Vic-20/Vic20.cpp b/Machines/Commodore/Vic-20/Vic20.cpp index a89e0a3d3..89c1bb1dc 100644 --- a/Machines/Commodore/Vic-20/Vic20.cpp +++ b/Machines/Commodore/Vic-20/Vic20.cpp @@ -767,5 +767,3 @@ std::unique_ptr Machine::Vic20(const Analyser::Static::Target *target, const Target *const commodore_target = dynamic_cast(target); return std::make_unique(*commodore_target, rom_fetcher); } - -Machine::~Machine() {} diff --git a/Machines/Commodore/Vic-20/Vic20.hpp b/Machines/Commodore/Vic-20/Vic20.hpp index 6a59ced92..e21ae244f 100644 --- a/Machines/Commodore/Vic-20/Vic20.hpp +++ b/Machines/Commodore/Vic-20/Vic20.hpp @@ -22,7 +22,7 @@ std::unique_ptr get_options(); class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns a Vic-20. static std::unique_ptr Vic20(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/DynamicMachine.hpp b/Machines/DynamicMachine.hpp index cc9aa92c7..0a8abd46e 100644 --- a/Machines/DynamicMachine.hpp +++ b/Machines/DynamicMachine.hpp @@ -20,7 +20,7 @@ namespace Machine { the machine's parent class or, therefore, the need to establish a common one. */ struct DynamicMachine { - virtual ~DynamicMachine() {} + virtual ~DynamicMachine() = default; virtual Activity::Source *activity_source() = 0; virtual Configurable::Device *configurable_device() = 0; diff --git a/Machines/Electron/Electron.cpp b/Machines/Electron/Electron.cpp index 4bd2781a5..c82df946b 100644 --- a/Machines/Electron/Electron.cpp +++ b/Machines/Electron/Electron.cpp @@ -796,5 +796,3 @@ std::unique_ptr Machine::Electron(const Analyser::Static::Target *targe return std::make_unique>(*acorn_target, rom_fetcher); } } - -Machine::~Machine() {} diff --git a/Machines/Electron/Electron.hpp b/Machines/Electron/Electron.hpp index 7f4cb6735..9d3146cdc 100644 --- a/Machines/Electron/Electron.hpp +++ b/Machines/Electron/Electron.hpp @@ -25,7 +25,7 @@ namespace Electron { */ class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an Electron. static std::unique_ptr Electron(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/Enterprise/Enterprise.cpp b/Machines/Enterprise/Enterprise.cpp index 7f1618c0b..485889796 100644 --- a/Machines/Enterprise/Enterprise.cpp +++ b/Machines/Enterprise/Enterprise.cpp @@ -768,5 +768,3 @@ std::unique_ptr Machine::Enterprise(const Analyser::Static::Target *tar return nullptr; } - -Machine::~Machine() {} diff --git a/Machines/Enterprise/Enterprise.hpp b/Machines/Enterprise/Enterprise.hpp index c7b7afb5a..fda8df3fb 100644 --- a/Machines/Enterprise/Enterprise.hpp +++ b/Machines/Enterprise/Enterprise.hpp @@ -25,7 +25,7 @@ namespace Enterprise { */ class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr Enterprise(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); /// Defines the runtime options available for an Enterprise. diff --git a/Machines/MSX/MSX.cpp b/Machines/MSX/MSX.cpp index f4e02b8f2..acf3fffa9 100644 --- a/Machines/MSX/MSX.cpp +++ b/Machines/MSX/MSX.cpp @@ -1050,5 +1050,3 @@ std::unique_ptr Machine::MSX(const Analyser::Static::Target *target, co } } } - -Machine::~Machine() {} diff --git a/Machines/MSX/MSX.hpp b/Machines/MSX/MSX.hpp index 55b29516b..4effe68ad 100644 --- a/Machines/MSX/MSX.hpp +++ b/Machines/MSX/MSX.hpp @@ -19,7 +19,7 @@ namespace MSX { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr MSX(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); class Options: public Reflection::StructImpl, public Configurable::DisplayOption, public Configurable::QuickloadOption { diff --git a/Machines/MSX/MemorySlotHandler.hpp b/Machines/MSX/MemorySlotHandler.hpp index 2b26ff646..8d29393b0 100644 --- a/Machines/MSX/MemorySlotHandler.hpp +++ b/Machines/MSX/MemorySlotHandler.hpp @@ -121,7 +121,7 @@ class PrimarySlot { class MemorySlotHandler { public: - virtual ~MemorySlotHandler() {} + virtual ~MemorySlotHandler() = default; /*! Advances time by @c half_cycles. */ virtual void run_for([[maybe_unused]] HalfCycles half_cycles) {} diff --git a/Machines/MasterSystem/MasterSystem.cpp b/Machines/MasterSystem/MasterSystem.cpp index 2f04e2cb8..40ffef60c 100644 --- a/Machines/MasterSystem/MasterSystem.cpp +++ b/Machines/MasterSystem/MasterSystem.cpp @@ -570,5 +570,3 @@ std::unique_ptr Machine::MasterSystem(const Analyser::Static::Target *t return nullptr; } } - -Machine::~Machine() {} diff --git a/Machines/MasterSystem/MasterSystem.hpp b/Machines/MasterSystem/MasterSystem.hpp index aa0309796..faabdfa6e 100644 --- a/Machines/MasterSystem/MasterSystem.hpp +++ b/Machines/MasterSystem/MasterSystem.hpp @@ -19,7 +19,7 @@ namespace Sega::MasterSystem { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr MasterSystem(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); class Options: public Reflection::StructImpl, public Configurable::DisplayOption { diff --git a/Machines/Oric/Oric.cpp b/Machines/Oric/Oric.cpp index 2aeed45ed..be8a0f5d0 100644 --- a/Machines/Oric/Oric.cpp +++ b/Machines/Oric/Oric.cpp @@ -816,5 +816,3 @@ std::unique_ptr Machine::Oric(const Analyser::Static::Target *target_hi return nullptr; } - -Machine::~Machine() {} diff --git a/Machines/Oric/Oric.hpp b/Machines/Oric/Oric.hpp index af1bc2dd5..83b203559 100644 --- a/Machines/Oric/Oric.hpp +++ b/Machines/Oric/Oric.hpp @@ -22,7 +22,7 @@ namespace Oric { */ class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns an Oric. static std::unique_ptr Oric(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); diff --git a/Machines/PCCompatible/PCCompatible.cpp b/Machines/PCCompatible/PCCompatible.cpp index 4cdd8b13a..09f0475af 100644 --- a/Machines/PCCompatible/PCCompatible.cpp +++ b/Machines/PCCompatible/PCCompatible.cpp @@ -1208,5 +1208,3 @@ std::unique_ptr Machine::PCCompatible(const Analyser::Static::Target *t default: return nullptr; } } - -Machine::~Machine() {} diff --git a/Machines/PCCompatible/PCCompatible.hpp b/Machines/PCCompatible/PCCompatible.hpp index 8e715547c..302f3b120 100644 --- a/Machines/PCCompatible/PCCompatible.hpp +++ b/Machines/PCCompatible/PCCompatible.hpp @@ -20,7 +20,7 @@ namespace PCCompatible { */ class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; /// Creates and returns a PC Compatible. static std::unique_ptr PCCompatible( diff --git a/Machines/Sinclair/ZX8081/ZX8081.cpp b/Machines/Sinclair/ZX8081/ZX8081.cpp index 535bbd36d..1186c20b7 100644 --- a/Machines/Sinclair/ZX8081/ZX8081.cpp +++ b/Machines/Sinclair/ZX8081/ZX8081.cpp @@ -503,5 +503,3 @@ std::unique_ptr Machine::ZX8081(const Analyser::Static::Target *target, if(zx_target->is_ZX81) return std::make_unique>(*zx_target, rom_fetcher); else return std::make_unique>(*zx_target, rom_fetcher); } - -Machine::~Machine() {} diff --git a/Machines/Sinclair/ZX8081/ZX8081.hpp b/Machines/Sinclair/ZX8081/ZX8081.hpp index abb56d72f..deba561fc 100644 --- a/Machines/Sinclair/ZX8081/ZX8081.hpp +++ b/Machines/Sinclair/ZX8081/ZX8081.hpp @@ -20,7 +20,7 @@ namespace Sinclair::ZX8081 { /// The ZX80/81 machine. class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr ZX8081(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); virtual void set_tape_is_playing(bool is_playing) = 0; diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp index c20e43fff..fae483b58 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.cpp @@ -1008,5 +1008,3 @@ std::unique_ptr Machine::ZXSpectrum(const Analyser::Static::Target *tar return nullptr; } - -Machine::~Machine() {} diff --git a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp index 3c3f8668e..b0203400a 100644 --- a/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp +++ b/Machines/Sinclair/ZXSpectrum/ZXSpectrum.hpp @@ -19,7 +19,7 @@ namespace Sinclair::ZXSpectrum { class Machine { public: - virtual ~Machine(); + virtual ~Machine() = default; static std::unique_ptr ZXSpectrum(const Analyser::Static::Target *target, const ROMMachine::ROMFetcher &rom_fetcher); virtual void set_tape_is_playing(bool is_playing) = 0; diff --git a/Machines/Utility/ROMCatalogue.hpp b/Machines/Utility/ROMCatalogue.hpp index 972d75923..4cec1b0da 100644 --- a/Machines/Utility/ROMCatalogue.hpp +++ b/Machines/Utility/ROMCatalogue.hpp @@ -222,7 +222,7 @@ std::vector all_descriptions(); struct Request { Request(Name name, bool optional = false); - Request() {} + Request() = default; /// Forms the request that would be satisfied by @c this plus the right-hand side. Request operator &&(const Request &); diff --git a/Machines/Utility/Typer.hpp b/Machines/Utility/Typer.hpp index 5cfd1c8bd..e0c6e0fdf 100644 --- a/Machines/Utility/Typer.hpp +++ b/Machines/Utility/Typer.hpp @@ -22,7 +22,7 @@ namespace Utility { */ class CharacterMapper { public: - virtual ~CharacterMapper() {} + virtual ~CharacterMapper() = default; /// @returns The EndSequence-terminated sequence of keys that would cause @c character to be typed. virtual const uint16_t *sequence_for_character(char character) const = 0; diff --git a/Numeric/RegisterSizes.hpp b/Numeric/RegisterSizes.hpp index b6e8dc928..fe09b079a 100644 --- a/Numeric/RegisterSizes.hpp +++ b/Numeric/RegisterSizes.hpp @@ -20,7 +20,7 @@ namespace CPU { /// Provides access to all intermediate parts of a larger int. template union alignas(Full) alignas(Half) RegisterPair { RegisterPair(Full v) : full(v) {} - RegisterPair() {} + RegisterPair() = default; Full full; #if TARGET_RT_BIG_ENDIAN diff --git a/OSBindings/SDL/main.cpp b/OSBindings/SDL/main.cpp index 17657e81c..7d2cfa29f 100644 --- a/OSBindings/SDL/main.cpp +++ b/OSBindings/SDL/main.cpp @@ -981,7 +981,7 @@ int main(int argc, char *argv[]) { KeyPress(uint32_t timestamp, const char *text) : timestamp(timestamp), input(text) {} KeyPress(uint32_t timestamp, SDL_Scancode scancode, SDL_Keycode keycode, bool is_down, bool repeat) : timestamp(timestamp), scancode(scancode), keycode(keycode), is_down(is_down), repeat(repeat) {} - KeyPress() {} + KeyPress() = default; }; std::vector keypresses; diff --git a/Outputs/ScanTarget.hpp b/Outputs/ScanTarget.hpp index c56d7beac..806ff12c7 100644 --- a/Outputs/ScanTarget.hpp +++ b/Outputs/ScanTarget.hpp @@ -198,7 +198,7 @@ inline std::array from_rgb_matrix(ColourSpace colour_space) { for use of shared memory where available. */ struct ScanTarget { - virtual ~ScanTarget() {} + virtual ~ScanTarget() = default; /* diff --git a/Outputs/Speaker/Speaker.hpp b/Outputs/Speaker/Speaker.hpp index edeee7811..1cb780d85 100644 --- a/Outputs/Speaker/Speaker.hpp +++ b/Outputs/Speaker/Speaker.hpp @@ -55,7 +55,7 @@ template struct SampleT { */ class Speaker { public: - virtual ~Speaker() {} + virtual ~Speaker() = default; /*! @returns The best output clock rate for the audio being supplied to this speaker, from the range given. diff --git a/Processors/6502/AllRAM/6502AllRAM.hpp b/Processors/6502/AllRAM/6502AllRAM.hpp index 7492f7441..f9df6e9b2 100644 --- a/Processors/6502/AllRAM/6502AllRAM.hpp +++ b/Processors/6502/AllRAM/6502AllRAM.hpp @@ -17,7 +17,7 @@ class AllRAMProcessor: public ::CPU::AllRAMProcessor { public: static AllRAMProcessor *Processor(CPU::MOS6502Esque::Type type, bool has_cias = false); - virtual ~AllRAMProcessor() {} + virtual ~AllRAMProcessor() = default; virtual void run_for(const Cycles cycles) = 0; virtual void run_for_instructions(int) = 0; diff --git a/Reflection/Struct.hpp b/Reflection/Struct.hpp index 283ffcaba..2ead24eb9 100644 --- a/Reflection/Struct.hpp +++ b/Reflection/Struct.hpp @@ -37,7 +37,7 @@ struct Struct { return const_cast(this)->get(name); } virtual std::vector values_for(const std::string &name) const = 0; - virtual ~Struct() {} + virtual ~Struct() = default; /*! @returns A string describing this struct. This string has no guaranteed layout, may not be diff --git a/Storage/Cartridge/Cartridge.hpp b/Storage/Cartridge/Cartridge.hpp index 140ee2d88..2403cdd1d 100644 --- a/Storage/Cartridge/Cartridge.hpp +++ b/Storage/Cartridge/Cartridge.hpp @@ -70,9 +70,9 @@ class Cartridge { const std::vector &get_segments() const { return segments_; } - virtual ~Cartridge() {} + virtual ~Cartridge() = default; - Cartridge() {} + Cartridge() = default; Cartridge(const std::vector &segments) : segments_(segments) {} protected: diff --git a/Storage/Disk/Disk.hpp b/Storage/Disk/Disk.hpp index 783502f49..00afb3431 100644 --- a/Storage/Disk/Disk.hpp +++ b/Storage/Disk/Disk.hpp @@ -24,7 +24,7 @@ namespace Storage::Disk { */ class Disk { public: - virtual ~Disk() {} + virtual ~Disk() = default; /*! @returns the number of discrete positions that this disk uses to model its complete surface area. diff --git a/Storage/Disk/DiskImage/DiskImage.hpp b/Storage/Disk/DiskImage/DiskImage.hpp index fe46812b8..fd78f8595 100644 --- a/Storage/Disk/DiskImage/DiskImage.hpp +++ b/Storage/Disk/DiskImage/DiskImage.hpp @@ -31,7 +31,7 @@ enum class Error { */ class DiskImage { public: - virtual ~DiskImage() {} + virtual ~DiskImage() = default; /*! @returns the distance at which there stops being any further content. diff --git a/Storage/Disk/Encodings/AppleGCR/Sector.hpp b/Storage/Disk/Encodings/AppleGCR/Sector.hpp index 1299d6148..e75b358c1 100644 --- a/Storage/Disk/Encodings/AppleGCR/Sector.hpp +++ b/Storage/Disk/Encodings/AppleGCR/Sector.hpp @@ -56,7 +56,7 @@ struct Sector { }; Encoding encoding = Encoding::SixAndTwo; - Sector() {} + Sector() = default; Sector(Sector &&rhs) : address(rhs.address), diff --git a/Storage/Disk/Encodings/MFM/Encoder.cpp b/Storage/Disk/Encodings/MFM/Encoder.cpp index aa05f47f9..84a73dc1d 100644 --- a/Storage/Disk/Encodings/MFM/Encoder.cpp +++ b/Storage/Disk/Encodings/MFM/Encoder.cpp @@ -82,7 +82,7 @@ enum class SurfaceItem { class MFMEncoder: public Encoder { public: MFMEncoder(std::vector &target, std::vector *fuzzy_target = nullptr) : Encoder(target, fuzzy_target) {} - virtual ~MFMEncoder() {} + virtual ~MFMEncoder() = default; void add_byte(uint8_t input, uint8_t fuzzy_mask = 0) final { crc_generator_.add(input); diff --git a/Storage/Disk/Encodings/MFM/Encoder.hpp b/Storage/Disk/Encodings/MFM/Encoder.hpp index b6ffbf71c..57e821526 100644 --- a/Storage/Disk/Encodings/MFM/Encoder.hpp +++ b/Storage/Disk/Encodings/MFM/Encoder.hpp @@ -42,7 +42,7 @@ std::shared_ptr TrackWithSectors( class Encoder { public: Encoder(std::vector &target, std::vector *fuzzy_target); - virtual ~Encoder() {} + virtual ~Encoder() = default; virtual void reset_target(std::vector &target, std::vector *fuzzy_target = nullptr); virtual void add_byte(uint8_t input, uint8_t fuzzy_mask = 0) = 0; diff --git a/Storage/Disk/Track/PCMSegment.hpp b/Storage/Disk/Track/PCMSegment.hpp index 9006b3634..f4a13e0d5 100644 --- a/Storage/Disk/Track/PCMSegment.hpp +++ b/Storage/Disk/Track/PCMSegment.hpp @@ -104,7 +104,7 @@ struct PCMSegment { Constructs an instance of PCMSegment where each bit window is 1 unit of time long and @c data is empty. */ - PCMSegment() {} + PCMSegment() = default; /// Empties the PCMSegment. void clear() { diff --git a/Storage/Disk/Track/Track.hpp b/Storage/Disk/Track/Track.hpp index af62d8f5b..cc1b5a9d6 100644 --- a/Storage/Disk/Track/Track.hpp +++ b/Storage/Disk/Track/Track.hpp @@ -68,7 +68,7 @@ class HeadPosition { */ class Track { public: - virtual ~Track() {} + virtual ~Track() = default; /*! Describes the location of a track, implementing < to allow for use as a set key. diff --git a/Storage/MassStorage/MassStorageDevice.hpp b/Storage/MassStorage/MassStorageDevice.hpp index b1b9e97c7..510b51c81 100644 --- a/Storage/MassStorage/MassStorageDevice.hpp +++ b/Storage/MassStorage/MassStorageDevice.hpp @@ -27,7 +27,7 @@ namespace Storage::MassStorage { */ class MassStorageDevice { public: - virtual ~MassStorageDevice() {} + virtual ~MassStorageDevice() = default; /*! @returns The size of each individual block. diff --git a/Storage/Tape/Tape.hpp b/Storage/Tape/Tape.hpp index 71299b7e0..43efb318d 100644 --- a/Storage/Tape/Tape.hpp +++ b/Storage/Tape/Tape.hpp @@ -39,7 +39,7 @@ class Tape { Time length; Pulse(Type type, Time length) : type(type), length(length) {} - Pulse() {} + Pulse() = default; }; /*! @@ -78,7 +78,7 @@ class Tape { */ virtual void seek(Time &time); - virtual ~Tape() {}; + virtual ~Tape() = default; private: uint64_t offset_; @@ -98,7 +98,7 @@ class Tape { class TapePlayer: public TimedEventLoop, public ClockingHint::Source { public: TapePlayer(int input_clock_rate); - virtual ~TapePlayer() {} + virtual ~TapePlayer() = default; void set_tape(std::shared_ptr tape); bool has_tape();