From b046a971d7327205eb5b6d7adc4ed9c5833cc8dc Mon Sep 17 00:00:00 2001 From: Allofich <19624336+Allofich@users.noreply.github.com> Date: Sat, 7 Sep 2024 15:09:58 +0900 Subject: [PATCH] Fix -Wsuggest-override warnings --- src/dos/cdrom.h | 58 ++++++++++++++++++++-------------------- src/dos/dos_programs.cpp | 4 +-- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/dos/cdrom.h b/src/dos/cdrom.h index 4f78c5bb78..7a096b3ef7 100644 --- a/src/dos/cdrom.h +++ b/src/dos/cdrom.h @@ -438,26 +438,26 @@ class CDROM_Interface_Aspi : public CDROM_Interface public: virtual ~CDROM_Interface_Aspi(void); - bool SetDevice (char* path, int forceCD); + bool SetDevice (char* path, int forceCD) override; - bool GetUPC (unsigned char& attr, char* upc); + bool GetUPC (unsigned char& attr, char* upc) override; - bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut); - bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr); - bool GetAudioSub (unsigned char& attr, unsigned char& track, unsigned char& index, TMSF& relPos, TMSF& absPos); - bool GetAudioStatus (bool& playing, bool& pause); - bool GetMediaTrayStatus (bool& mediaPresent, bool& mediaChanged, bool& trayOpen); + bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut) override; + bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr) override; + bool GetAudioSub (unsigned char& attr, unsigned char& track, unsigned char& index, TMSF& relPos, TMSF& absPos) override; + bool GetAudioStatus (bool& playing, bool& pause) override; + bool GetMediaTrayStatus (bool& mediaPresent, bool& mediaChanged, bool& trayOpen) override; - bool PlayAudioSector (unsigned long start,unsigned long len); - bool PauseAudio (bool resume); - bool StopAudio (void); - void ChannelControl (TCtrl ctrl) { (void)ctrl; return; }; + bool PlayAudioSector (unsigned long start,unsigned long len) override; + bool PauseAudio (bool resume) override; + bool StopAudio (void) override; + void ChannelControl (TCtrl ctrl) override { (void)ctrl; return; }; - bool ReadSectors (PhysPt buffer, bool raw, unsigned long sector, unsigned long num); + bool ReadSectors (PhysPt buffer, bool raw, unsigned long sector, unsigned long num) override; /* This is needed for IDE hack, who's buffer does not exist in DOS physical memory */ - bool ReadSectorsHost (void* buffer, bool raw, unsigned long sector, unsigned long num); + bool ReadSectorsHost (void* buffer, bool raw, unsigned long sector, unsigned long num) override; - bool LoadUnloadMedia (bool unload); + bool LoadUnloadMedia (bool unload) override; private: DWORD GetTOC (LPTOC toc); @@ -491,29 +491,29 @@ class CDROM_Interface_Ioctl : public CDROM_Interface CDROM_Interface_Ioctl (cdioctl_cdatype ioctl_cda); virtual ~CDROM_Interface_Ioctl(void); - bool SetDevice (char* path, int forceCD); + bool SetDevice (char* path, int forceCD) override; - bool GetUPC (unsigned char& attr, char* upc); + bool GetUPC (unsigned char& attr, char* upc) override; - bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut); - bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr); - bool GetAudioSub (unsigned char& attr, unsigned char& track, unsigned char& index, TMSF& relPos, TMSF& absPos); - bool GetAudioStatus (bool& playing, bool& pause); - bool GetMediaTrayStatus (bool& mediaPresent, bool& mediaChanged, bool& trayOpen); + bool GetAudioTracks (int& stTrack, int& end, TMSF& leadOut) override; + bool GetAudioTrackInfo (int track, TMSF& start, unsigned char& attr) override; + bool GetAudioSub (unsigned char& attr, unsigned char& track, unsigned char& index, TMSF& relPos, TMSF& absPos) override; + bool GetAudioStatus (bool& playing, bool& pause) override; + bool GetMediaTrayStatus (bool& mediaPresent, bool& mediaChanged, bool& trayOpen) override; - bool PlayAudioSector (unsigned long start,unsigned long len); - bool PauseAudio (bool resume); - bool StopAudio (void); - void ChannelControl (TCtrl ctrl); + bool PlayAudioSector (unsigned long start,unsigned long len) override; + bool PauseAudio (bool resume) override; + bool StopAudio (void) override; + void ChannelControl (TCtrl ctrl) override; bool ReadSector (uint8_t *buffer, bool raw, unsigned long sector); - bool ReadSectors (PhysPt buffer, bool raw, unsigned long sector, unsigned long num); + bool ReadSectors (PhysPt buffer, bool raw, unsigned long sector, unsigned long num) override; /* This is needed for IDE hack, who's buffer does not exist in DOS physical memory */ - bool ReadSectorsHost (void* buffer, bool raw, unsigned long sector, unsigned long num); + bool ReadSectorsHost (void* buffer, bool raw, unsigned long sector, unsigned long num) override; - bool LoadUnloadMedia (bool unload); + bool LoadUnloadMedia (bool unload) override; - void InitNewMedia (void) { Close(); Open(); }; + void InitNewMedia (void) override { Close(); Open(); }; private: bool Open (void); diff --git a/src/dos/dos_programs.cpp b/src/dos/dos_programs.cpp index 4bc26b0d84..5f7292209a 100644 --- a/src/dos/dos_programs.cpp +++ b/src/dos/dos_programs.cpp @@ -3221,7 +3221,7 @@ static void LOADROM_ProgramStart(Program * * make) { #if C_DEBUG class BIOSTEST : public Program { public: - void Run(void) { + void Run(void) override { if (!(cmd->FindCommand(1, temp_line))) { WriteOut("Must specify BIOS file to load.\n"); return; @@ -7196,7 +7196,7 @@ void VFRCRATE_ProgramStart(Program * * make); #if defined C_DEBUG class NMITEST : public Program { public: - void Run(void) { + void Run(void) override { if (cmd->FindExist("-?", false) || cmd->FindExist("/?", false)) { WriteOut("Generates a non-maskable interrupt (NMI).\n\nNMITEST\n\nNote: This is a debugging tool to test if the interrupt handler works properly.\n"); return;