diff --git a/Core/Debugger/DisassemblyManager.h b/Core/Debugger/DisassemblyManager.h index d4448543f9..a9a8d762fe 100644 --- a/Core/Debugger/DisassemblyManager.h +++ b/Core/Debugger/DisassemblyManager.h @@ -70,13 +70,14 @@ class DisassemblyFunction: public DisassemblyEntry { public: DisassemblyFunction(u32 _address, u32 _size); - virtual void recheck(); - virtual int getNumLines(); - virtual int getLineNum(u32 address, bool findStart); - virtual u32 getLineAddress(int line); - virtual u32 getTotalSize() { return size; }; - virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols); - virtual void getBranchLines(u32 start, u32 size, std::vector& dest); + void recheck() override; + int getNumLines() override; + int getLineNum(u32 address, bool findStart) override; + u32 getLineAddress(int line) override; + u32 getTotalSize() override { return size; }; + bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override; + void getBranchLines(u32 start, u32 size, std::vector& dest) override; + private: void generateBranchLines(); void load(); @@ -96,13 +97,14 @@ class DisassemblyOpcode: public DisassemblyEntry public: DisassemblyOpcode(u32 _address, int _num): address(_address), num(_num) { }; virtual ~DisassemblyOpcode() { }; - virtual void recheck() { }; - virtual int getNumLines() { return num; }; - virtual int getLineNum(u32 address, bool findStart) { return (address-this->address)/4; }; - virtual u32 getLineAddress(int line) { return address+line*4; }; - virtual u32 getTotalSize() { return num*4; }; - virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols); - virtual void getBranchLines(u32 start, u32 size, std::vector& dest); + void recheck() override { }; + int getNumLines() override { return num; }; + int getLineNum(u32 address, bool findStart) override { return (address - this->address) / 4; }; + u32 getLineAddress(int line) override { return address + line * 4; }; + u32 getTotalSize() override { return num * 4; }; + bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override; + void getBranchLines(u32 start, u32 size, std::vector& dest) override; + private: u32 address; int num; @@ -114,16 +116,16 @@ class DisassemblyMacro: public DisassemblyEntry public: DisassemblyMacro(u32 _address): address(_address) { }; virtual ~DisassemblyMacro() { }; - + void setMacroLi(u32 _immediate, u8 _rt); void setMacroMemory(std::string _name, u32 _immediate, u8 _rt, int _dataSize); - - virtual void recheck() { }; - virtual int getNumLines() { return 1; }; - virtual int getLineNum(u32 address, bool findStart) { return 0; }; - virtual u32 getLineAddress(int line) { return address; }; - virtual u32 getTotalSize() { return numOpcodes*4; }; - virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) ; + + void recheck() override { }; + int getNumLines() override { return 1; }; + int getLineNum(u32 address, bool findStart) override { return 0; }; + u32 getLineAddress(int line) override { return address; }; + u32 getTotalSize() override { return numOpcodes * 4; }; + bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override; private: enum MacroType { MACRO_LI, MACRO_MEMORYIMM }; @@ -142,13 +144,14 @@ class DisassemblyData: public DisassemblyEntry public: DisassemblyData(u32 _address, u32 _size, DataType _type); virtual ~DisassemblyData() { }; - - virtual void recheck(); - virtual int getNumLines() { return (int)lines.size(); }; - virtual int getLineNum(u32 address, bool findStart); - virtual u32 getLineAddress(int line) { return lineAddresses[line]; }; - virtual u32 getTotalSize() { return size; }; - virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols); + + void recheck() override; + int getNumLines() override { return (int)lines.size(); }; + int getLineNum(u32 address, bool findStart) override; + u32 getLineAddress(int line) override { return lineAddresses[line]; }; + u32 getTotalSize() override { return size; }; + bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override; + private: void createLines(); @@ -172,13 +175,14 @@ class DisassemblyComment: public DisassemblyEntry public: DisassemblyComment(u32 _address, u32 _size, std::string name, std::string param); virtual ~DisassemblyComment() { }; - - virtual void recheck() { }; - virtual int getNumLines() { return 1; }; - virtual int getLineNum(u32 address, bool findStart) { return 0; }; - virtual u32 getLineAddress(int line) { return address; }; - virtual u32 getTotalSize() { return size; }; - virtual bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols); + + void recheck() override { }; + int getNumLines() override { return 1; }; + int getLineNum(u32 address, bool findStart) override { return 0; }; + u32 getLineAddress(int line) override { return address; }; + u32 getTotalSize() override { return size; }; + bool disassemble(u32 address, DisassemblyLineInfo& dest, bool insertSymbols) override; + private: u32 address; u32 size; diff --git a/Core/Dialog/PSPGamedataInstallDialog.h b/Core/Dialog/PSPGamedataInstallDialog.h index e557dd2776..0ec969443b 100644 --- a/Core/Dialog/PSPGamedataInstallDialog.h +++ b/Core/Dialog/PSPGamedataInstallDialog.h @@ -42,9 +42,9 @@ public: virtual ~PSPGamedataInstallDialog(); virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed); - virtual int Shutdown(bool force = false); - virtual void DoState(PointerWrap &p); + virtual int Update(int animSpeed) override; + virtual int Shutdown(bool force = false) override; + virtual void DoState(PointerWrap &p) override; int Abort(); std::string GetGameDataInstallFileName(SceUtilityGamedataInstallParam *param, std::string filename); diff --git a/Core/Dialog/PSPMsgDialog.h b/Core/Dialog/PSPMsgDialog.h index a2f30a797d..4d1ce44ce7 100644 --- a/Core/Dialog/PSPMsgDialog.h +++ b/Core/Dialog/PSPMsgDialog.h @@ -60,10 +60,10 @@ public: virtual ~PSPMsgDialog(); virtual int Init(unsigned int paramAddr); - virtual int Update(int animSpeed); - virtual int Shutdown(bool force = false); - virtual void DoState(PointerWrap &p); - virtual pspUtilityDialogCommon *GetCommonParam(); + virtual int Update(int animSpeed) override; + virtual int Shutdown(bool force = false) override; + virtual void DoState(PointerWrap &p) override; + virtual pspUtilityDialogCommon *GetCommonParam() override; int Abort(); diff --git a/Core/Dialog/PSPNetconfDialog.h b/Core/Dialog/PSPNetconfDialog.h index f0a941007c..cdb0e5686e 100644 --- a/Core/Dialog/PSPNetconfDialog.h +++ b/Core/Dialog/PSPNetconfDialog.h @@ -40,9 +40,9 @@ public: virtual ~PSPNetconfDialog(); virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed); - virtual int Shutdown(bool force = false); - virtual void DoState(PointerWrap &p); + virtual int Update(int animSpeed) override; + virtual int Shutdown(bool force = false) override; + virtual void DoState(PointerWrap &p) override; private: void DrawBanner(); diff --git a/Core/Dialog/PSPOskDialog.h b/Core/Dialog/PSPOskDialog.h index dad3d86166..dd4850f809 100644 --- a/Core/Dialog/PSPOskDialog.h +++ b/Core/Dialog/PSPOskDialog.h @@ -206,10 +206,10 @@ public: virtual ~PSPOskDialog(); virtual int Init(u32 oskPtr); - virtual int Update(int animSpeed); - virtual int Shutdown(bool force = false); - virtual void DoState(PointerWrap &p); - virtual pspUtilityDialogCommon *GetCommonParam(); + virtual int Update(int animSpeed) override; + virtual int Shutdown(bool force = false) override; + virtual void DoState(PointerWrap &p) override; + virtual pspUtilityDialogCommon *GetCommonParam() override; protected: virtual bool UseAutoStatus() { diff --git a/Core/Dialog/PSPPlaceholderDialog.h b/Core/Dialog/PSPPlaceholderDialog.h index 42fba56520..921ae9123f 100644 --- a/Core/Dialog/PSPPlaceholderDialog.h +++ b/Core/Dialog/PSPPlaceholderDialog.h @@ -25,6 +25,6 @@ public: virtual ~PSPPlaceholderDialog(); virtual int Init(); - virtual int Update(int animSpeed); + virtual int Update(int animSpeed) override; }; diff --git a/Core/Dialog/PSPSaveDialog.h b/Core/Dialog/PSPSaveDialog.h index f358e6958a..6eea72d461 100644 --- a/Core/Dialog/PSPSaveDialog.h +++ b/Core/Dialog/PSPSaveDialog.h @@ -73,10 +73,10 @@ public: virtual ~PSPSaveDialog(); virtual int Init(int paramAddr); - virtual int Update(int animSpeed); - virtual int Shutdown(bool force = false); - virtual void DoState(PointerWrap &p); - virtual pspUtilityDialogCommon *GetCommonParam(); + virtual int Update(int animSpeed) override; + virtual int Shutdown(bool force = false) override; + virtual void DoState(PointerWrap &p) override; + virtual pspUtilityDialogCommon *GetCommonParam() override; void ExecuteIOAction(); diff --git a/Core/Dialog/PSPScreenshotDialog.h b/Core/Dialog/PSPScreenshotDialog.h index 68b4ba8c54..17e7d083aa 100644 --- a/Core/Dialog/PSPScreenshotDialog.h +++ b/Core/Dialog/PSPScreenshotDialog.h @@ -28,9 +28,9 @@ public: virtual ~PSPScreenshotDialog(); virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed); + virtual int Update(int animSpeed) override; virtual int ContStart(); - virtual void DoState(PointerWrap &p); + virtual void DoState(PointerWrap &p) override; protected: int mode; diff --git a/Core/FileSystems/BlockDevices.h b/Core/FileSystems/BlockDevices.h index a715514a9f..90d5640fbe 100644 --- a/Core/FileSystems/BlockDevices.h +++ b/Core/FileSystems/BlockDevices.h @@ -54,7 +54,7 @@ public: ~CISOFileBlockDevice(); bool ReadBlock(int blockNumber, u8 *outPtr) override; bool ReadBlocks(u32 minBlock, int count, u8 *outPtr) override; - u32 GetNumBlocks() { return numBlocks;} + u32 GetNumBlocks() override { return numBlocks; } private: FileLoader *fileLoader_; diff --git a/Core/FileSystems/DirectoryFileSystem.h b/Core/FileSystems/DirectoryFileSystem.h index 5360967f46..78d06d9d72 100644 --- a/Core/FileSystems/DirectoryFileSystem.h +++ b/Core/FileSystems/DirectoryFileSystem.h @@ -91,24 +91,24 @@ public: void CloseAll(); - void DoState(PointerWrap &p); - std::vector GetDirListing(std::string path); - u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); - void CloseFile(u32 handle); - size_t ReadFile(u32 handle, u8 *pointer, s64 size); - size_t WriteFile(u32 handle, const u8 *pointer, s64 size); - size_t SeekFile(u32 handle, s32 position, FileMove type); - PSPFileInfo GetFileInfo(std::string filename); - bool OwnsHandle(u32 handle); - int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec); - int DevType(u32 handle); + void DoState(PointerWrap &p) override; + std::vector GetDirListing(std::string path) override; + u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) override; + void CloseFile(u32 handle) override; + size_t ReadFile(u32 handle, u8 *pointer, s64 size) override; + size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override; + size_t SeekFile(u32 handle, s32 position, FileMove type) override; + PSPFileInfo GetFileInfo(std::string filename) override; + bool OwnsHandle(u32 handle) override; + int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override; + int DevType(u32 handle) override; - bool MkDir(const std::string &dirname); - bool RmDir(const std::string &dirname); - int RenameFile(const std::string &from, const std::string &to); - bool RemoveFile(const std::string &filename); - bool GetHostPath(const std::string &inpath, std::string &outpath); - int Flags() { return flags; } + bool MkDir(const std::string &dirname) override; + bool RmDir(const std::string &dirname) override; + int RenameFile(const std::string &from, const std::string &to) override; + bool RemoveFile(const std::string &filename) override; + bool GetHostPath(const std::string &inpath, std::string &outpath) override; + int Flags() override { return flags; } u64 FreeSpace(const std::string &path) override; private: @@ -134,24 +134,24 @@ public: VFSFileSystem(IHandleAllocator *_hAlloc, std::string _basePath); ~VFSFileSystem(); - void DoState(PointerWrap &p); - std::vector GetDirListing(std::string path); - u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); - void CloseFile(u32 handle); - size_t ReadFile(u32 handle, u8 *pointer, s64 size); - size_t WriteFile(u32 handle, const u8 *pointer, s64 size); - size_t SeekFile(u32 handle, s32 position, FileMove type); - PSPFileInfo GetFileInfo(std::string filename); - bool OwnsHandle(u32 handle); - int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec); - int DevType(u32 handle); + void DoState(PointerWrap &p) override; + std::vector GetDirListing(std::string path) override; + u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) override; + void CloseFile(u32 handle) override; + size_t ReadFile(u32 handle, u8 *pointer, s64 size) override; + size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override; + size_t SeekFile(u32 handle, s32 position, FileMove type) override; + PSPFileInfo GetFileInfo(std::string filename) override; + bool OwnsHandle(u32 handle) override; + int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override; + int DevType(u32 handle) override; - bool MkDir(const std::string &dirname); - bool RmDir(const std::string &dirname); - int RenameFile(const std::string &from, const std::string &to); - bool RemoveFile(const std::string &filename); - bool GetHostPath(const std::string &inpath, std::string &outpath); - int Flags() { return 0; } + bool MkDir(const std::string &dirname) override; + bool RmDir(const std::string &dirname) override; + int RenameFile(const std::string &from, const std::string &to) override; + bool RemoveFile(const std::string &filename) override; + bool GetHostPath(const std::string &inpath, std::string &outpath) override; + int Flags() override { return 0; } u64 FreeSpace(const std::string &path) override { return 0; } private: diff --git a/Core/FileSystems/MetaFileSystem.h b/Core/FileSystems/MetaFileSystem.h index 2a81d71c7e..e1f99e21c0 100644 --- a/Core/FileSystems/MetaFileSystem.h +++ b/Core/FileSystems/MetaFileSystem.h @@ -67,9 +67,9 @@ public: } return res; } - void FreeHandle(u32 handle) {} + void FreeHandle(u32 handle) override {} - virtual void DoState(PointerWrap &p); + void DoState(PointerWrap &p) override; IFileSystem *GetHandleOwner(u32 handle); bool MapFilePath(const std::string &inpath, std::string &outpath, MountPoint **system); @@ -89,17 +89,17 @@ public: std::string NormalizePrefix(std::string prefix) const; // Only possible if a file system is a DirectoryFileSystem or similar. - bool GetHostPath(const std::string &inpath, std::string &outpath); + bool GetHostPath(const std::string &inpath, std::string &outpath) override; - std::vector GetDirListing(std::string path); - u32 OpenFile(std::string filename, FileAccess access, const char *devicename = NULL); + std::vector GetDirListing(std::string path) override; + u32 OpenFile(std::string filename, FileAccess access, const char *devicename = NULL) override; u32 OpenWithError(int &error, std::string filename, FileAccess access, const char *devicename = NULL); - void CloseFile(u32 handle); - size_t ReadFile(u32 handle, u8 *pointer, s64 size); - size_t WriteFile(u32 handle, const u8 *pointer, s64 size); - size_t SeekFile(u32 handle, s32 position, FileMove type); - PSPFileInfo GetFileInfo(std::string filename); - bool OwnsHandle(u32 handle) {return false;} + void CloseFile(u32 handle) override; + size_t ReadFile(u32 handle, u8 *pointer, s64 size) override; + size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override; + size_t SeekFile(u32 handle, s32 position, FileMove type) override; + PSPFileInfo GetFileInfo(std::string filename) override; + bool OwnsHandle(u32 handle) override { return false; } inline size_t GetSeekPos(u32 handle) { return SeekFile(handle, 0, FILEMOVE_CURRENT); @@ -107,14 +107,14 @@ public: virtual int ChDir(const std::string &dir); - virtual bool MkDir(const std::string &dirname); - virtual bool RmDir(const std::string &dirname); - virtual int RenameFile(const std::string &from, const std::string &to); - virtual bool RemoveFile(const std::string &filename); - virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec); - virtual int DevType(u32 handle); - virtual int Flags() { return 0; } - virtual u64 FreeSpace(const std::string &path) override; + bool MkDir(const std::string &dirname) override; + bool RmDir(const std::string &dirname) override; + int RenameFile(const std::string &from, const std::string &to) override; + bool RemoveFile(const std::string &filename) override; + int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override; + int DevType(u32 handle) override; + int Flags() override { return 0; } + u64 FreeSpace(const std::string &path) override; // Convenience helper - returns < 0 on failure. int ReadEntireFile(const std::string &filename, std::vector &data); diff --git a/Core/FileSystems/VirtualDiscFileSystem.h b/Core/FileSystems/VirtualDiscFileSystem.h index aab5f10fff..fca50d73cf 100644 --- a/Core/FileSystems/VirtualDiscFileSystem.h +++ b/Core/FileSystems/VirtualDiscFileSystem.h @@ -29,26 +29,26 @@ public: VirtualDiscFileSystem(IHandleAllocator *_hAlloc, std::string _basePath); ~VirtualDiscFileSystem(); - void DoState(PointerWrap &p); - u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL); - size_t SeekFile(u32 handle, s32 position, FileMove type); - size_t ReadFile(u32 handle, u8 *pointer, s64 size); - void CloseFile(u32 handle); - PSPFileInfo GetFileInfo(std::string filename); - bool OwnsHandle(u32 handle); - int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec); - int DevType(u32 handle); - bool GetHostPath(const std::string &inpath, std::string &outpath); - std::vector GetDirListing(std::string path); - int Flags() { return 0; } + void DoState(PointerWrap &p) override; + u32 OpenFile(std::string filename, FileAccess access, const char *devicename=NULL) override; + size_t SeekFile(u32 handle, s32 position, FileMove type) override; + size_t ReadFile(u32 handle, u8 *pointer, s64 size) override; + void CloseFile(u32 handle) override; + PSPFileInfo GetFileInfo(std::string filename) override; + bool OwnsHandle(u32 handle) override; + int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override; + int DevType(u32 handle) override; + bool GetHostPath(const std::string &inpath, std::string &outpath) override; + std::vector GetDirListing(std::string path) override; + int Flags() override { return 0; } u64 FreeSpace(const std::string &path) override { return 0; } // unsupported operations - size_t WriteFile(u32 handle, const u8 *pointer, s64 size); - bool MkDir(const std::string &dirname); - bool RmDir(const std::string &dirname); - int RenameFile(const std::string &from, const std::string &to); - bool RemoveFile(const std::string &filename); + size_t WriteFile(u32 handle, const u8 *pointer, s64 size) override; + bool MkDir(const std::string &dirname) override; + bool RmDir(const std::string &dirname) override; + int RenameFile(const std::string &from, const std::string &to) override; + bool RemoveFile(const std::string &filename) override; private: void LoadFileListIndex(); diff --git a/Core/HLE/sceFont.cpp b/Core/HLE/sceFont.cpp index 3fd121d858..42b2551256 100644 --- a/Core/HLE/sceFont.cpp +++ b/Core/HLE/sceFont.cpp @@ -340,7 +340,7 @@ class PostAllocCallback : public Action { public: PostAllocCallback() {} static Action *Create() { return new PostAllocCallback(); } - void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("PostAllocCallback", 1, 2); if (!s) return; @@ -350,7 +350,7 @@ public: p.Do(errorCodePtr_); } } - void run(MipsCall &call); + void run(MipsCall &call) override; void SetFontLib(u32 fontLibID, u32 errorCodePtr) { fontLibID_ = fontLibID; errorCodePtr_ = errorCodePtr; } private: @@ -362,14 +362,14 @@ class PostOpenCallback : public Action { public: PostOpenCallback() {} static Action *Create() { return new PostOpenCallback(); } - void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("PostOpenCallback", 1); if (!s) return; p.Do(fontLibID_); } - void run(MipsCall &call); + void run(MipsCall &call) override; void SetFontLib(u32 fontLibID) { fontLibID_ = fontLibID; } private: diff --git a/Core/HLE/sceGe.cpp b/Core/HLE/sceGe.cpp index 6bc972fcae..65857854ca 100644 --- a/Core/HLE/sceGe.cpp +++ b/Core/HLE/sceGe.cpp @@ -127,7 +127,7 @@ class GeIntrHandler : public IntrHandler public: GeIntrHandler() : IntrHandler(PSP_GE_INTR) {} - bool run(PendingInterrupt& pend) + bool run(PendingInterrupt& pend) override { GeInterruptData intrdata = ge_pending_cb.front(); DisplayList* dl = gpu->getList(intrdata.listid); @@ -210,7 +210,7 @@ public: return false; } - virtual void handleResult(PendingInterrupt& pend) + void handleResult(PendingInterrupt& pend) override { GeInterruptData intrdata = ge_pending_cb.front(); ge_pending_cb.pop_front(); diff --git a/Core/HLE/sceIo.cpp b/Core/HLE/sceIo.cpp index 19dd1183b9..6b2d4cee80 100644 --- a/Core/HLE/sceIo.cpp +++ b/Core/HLE/sceIo.cpp @@ -159,20 +159,20 @@ public: pspFileSystem.CloseFile(handle); pgd_close(pgdInfo); } - const char *GetName() {return fullpath.c_str();} - const char *GetTypeName() {return "OpenFile";} - void GetQuickInfo(char *ptr, int size) { + const char *GetName() override { return fullpath.c_str(); } + const char *GetTypeName() override { return "OpenFile"; } + void GetQuickInfo(char *ptr, int size) override { sprintf(ptr, "Seekpos: %08x", (u32)pspFileSystem.GetSeekPos(handle)); } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_BADF; } static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_File; } - int GetIDType() const { return PPSSPP_KERNEL_TMID_File; } + int GetIDType() const override { return PPSSPP_KERNEL_TMID_File; } bool asyncBusy() { return pendingAsyncResult || hasAsyncResult; } - virtual void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("FileNode", 1); if (!s) return; @@ -1874,13 +1874,13 @@ static u32 sceIoPollAsync(int id, u32 address) { class DirListing : public KernelObject { public: - const char *GetName() {return name.c_str();} - const char *GetTypeName() {return "DirListing";} + const char *GetName() override { return name.c_str(); } + const char *GetTypeName() override { return "DirListing"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_BADF; } static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_DirList; } - int GetIDType() const { return PPSSPP_KERNEL_TMID_DirList; } + int GetIDType() const override { return PPSSPP_KERNEL_TMID_DirList; } - virtual void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("DirListing", 1); if (!s) return; diff --git a/Core/HLE/sceKernelAlarm.cpp b/Core/HLE/sceKernelAlarm.cpp index 90c4b68fd5..a234ac4f13 100644 --- a/Core/HLE/sceKernelAlarm.cpp +++ b/Core/HLE/sceKernelAlarm.cpp @@ -64,7 +64,7 @@ class AlarmIntrHandler : public IntrHandler public: AlarmIntrHandler() : IntrHandler(PSP_SYSTIMER0_INTR) {} - virtual bool run(PendingInterrupt& pend) + bool run(PendingInterrupt& pend) override { u32 error; int alarmID = triggeredAlarm.front(); @@ -83,7 +83,7 @@ public: return true; } - virtual void handleResult(PendingInterrupt& pend) + void handleResult(PendingInterrupt& pend) override { int result = currentMIPS->r[MIPS_REG_V0]; diff --git a/Core/HLE/sceKernelEventFlag.cpp b/Core/HLE/sceKernelEventFlag.cpp index 5cde8d8839..24cc835fda 100644 --- a/Core/HLE/sceKernelEventFlag.cpp +++ b/Core/HLE/sceKernelEventFlag.cpp @@ -58,9 +58,9 @@ struct EventFlagTh class EventFlag : public KernelObject { public: - const char *GetName() {return nef.name;} - const char *GetTypeName() {return "EventFlag";} - void GetQuickInfo(char *ptr, int size) + const char *GetName() override { return nef.name; } + const char *GetTypeName() override { return "EventFlag"; } + void GetQuickInfo(char *ptr, int size) override { sprintf(ptr, "init=%08x cur=%08x numwait=%i", nef.initPattern, @@ -72,9 +72,9 @@ public: return SCE_KERNEL_ERROR_UNKNOWN_EVFID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_EventFlag; } - int GetIDType() const { return SCE_KERNEL_TMID_EventFlag; } + int GetIDType() const override { return SCE_KERNEL_TMID_EventFlag; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("EventFlag", 1); if (!s) diff --git a/Core/HLE/sceKernelMbx.cpp b/Core/HLE/sceKernelMbx.cpp index 30d4c5bf62..d9fe542da0 100644 --- a/Core/HLE/sceKernelMbx.cpp +++ b/Core/HLE/sceKernelMbx.cpp @@ -60,11 +60,11 @@ struct NativeMbx struct Mbx : public KernelObject { - const char *GetName() {return nmb.name;} - const char *GetTypeName() {return "Mbx";} + const char *GetName() override { return nmb.name; } + const char *GetTypeName() override { return "Mbx"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_MBXID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Mbox; } - int GetIDType() const { return SCE_KERNEL_TMID_Mbox; } + int GetIDType() const override { return SCE_KERNEL_TMID_Mbox; } void AddWaitingThread(SceUID id, u32 addr) { @@ -159,7 +159,7 @@ struct Mbx : public KernelObject return 0; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Mbx", 1); if (!s) diff --git a/Core/HLE/sceKernelMemory.cpp b/Core/HLE/sceKernelMemory.cpp index 2586b21c69..8d0561f03d 100644 --- a/Core/HLE/sceKernelMemory.cpp +++ b/Core/HLE/sceKernelMemory.cpp @@ -90,11 +90,11 @@ struct FPL : public KernelObject delete [] blocks; } } - const char *GetName() {return nf.name;} - const char *GetTypeName() {return "FPL";} + const char *GetName() override { return nf.name; } + const char *GetTypeName() override { return "FPL"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_FPLID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Fpl; } - int GetIDType() const { return SCE_KERNEL_TMID_Fpl; } + int GetIDType() const override { return SCE_KERNEL_TMID_Fpl; } int findFreeBlock() { for (int i = 0; i < nf.numBlocks; i++) { @@ -121,7 +121,7 @@ struct FPL : public KernelObject return false; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("FPL", 1); if (!s) @@ -379,17 +379,17 @@ struct SceKernelVplHeader { struct VPL : public KernelObject { - const char *GetName() {return nv.name;} - const char *GetTypeName() {return "VPL";} + const char *GetName() override { return nv.name; } + const char *GetTypeName() override { return "VPL"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_VPLID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Vpl; } - int GetIDType() const { return SCE_KERNEL_TMID_Vpl; } + int GetIDType() const override { return SCE_KERNEL_TMID_Vpl; } VPL() : alloc(8) { header = 0; } - virtual void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("VPL", 1, 2); if (!s) { return; @@ -896,16 +896,16 @@ int sceKernelReferFplStatus(SceUID uid, u32 statusPtr) class PartitionMemoryBlock : public KernelObject { public: - const char *GetName() {return name;} - const char *GetTypeName() {return "MemoryPart";} - void GetQuickInfo(char *ptr, int size) + const char *GetName() override { return name; } + const char *GetTypeName() override { return "MemoryPart"; } + void GetQuickInfo(char *ptr, int size) override { int sz = alloc->GetBlockSizeFromAddress(address); snprintf(ptr, size, "MemPart: %08x - %08x size: %08x", address, address + sz, sz); } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_UID; } static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_PMB; } - int GetIDType() const { return PPSSPP_KERNEL_TMID_PMB; } + int GetIDType() const override { return PPSSPP_KERNEL_TMID_PMB; } PartitionMemoryBlock(BlockAllocator *_alloc, const char *_name, u32 size, MemblockType type, u32 alignment) { @@ -938,7 +938,7 @@ public: bool IsValid() {return address != (u32)-1;} BlockAllocator *alloc; - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("PMB", 1); if (!s) @@ -1865,15 +1865,15 @@ struct NativeTlspl struct TLSPL : public KernelObject { - const char *GetName() {return ntls.name;} - const char *GetTypeName() {return "TLS";} + const char *GetName() override { return ntls.name; } + const char *GetTypeName() override { return "TLS"; } static u32 GetMissingErrorCode() { return PSP_ERROR_UNKNOWN_TLSPL_ID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Tlspl; } - int GetIDType() const { return SCE_KERNEL_TMID_Tlspl; } + int GetIDType() const override { return SCE_KERNEL_TMID_Tlspl; } TLSPL() : next(0) {} - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("TLS", 1); if (!s) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index 2338df1f3c..ff3b59b8b5 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -230,9 +230,9 @@ public: symbolMap.UnloadModule(memoryBlockAddr, memoryBlockSize); } } - const char *GetName() {return nm.name;} - const char *GetTypeName() {return "Module";} - void GetQuickInfo(char *ptr, int size) + const char *GetName() override { return nm.name; } + const char *GetTypeName() override { return "Module"; } + void GetQuickInfo(char *ptr, int size) override { // ignore size sprintf(ptr, "%sname=%s gp=%08x entry=%08x", @@ -243,9 +243,9 @@ public: } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_MODULE; } static int GetStaticIDType() { return PPSSPP_KERNEL_TMID_Module; } - int GetIDType() const { return PPSSPP_KERNEL_TMID_Module; } + int GetIDType() const override { return PPSSPP_KERNEL_TMID_Module; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Module", 1, 3); if (!s) diff --git a/Core/HLE/sceKernelMsgPipe.cpp b/Core/HLE/sceKernelMsgPipe.cpp index c6803de02c..7b4e0bf132 100644 --- a/Core/HLE/sceKernelMsgPipe.cpp +++ b/Core/HLE/sceKernelMsgPipe.cpp @@ -130,11 +130,11 @@ static bool __KernelMsgPipeThreadSortPriority(MsgPipeWaitingThread thread1, MsgP struct MsgPipe : public KernelObject { - const char *GetName() {return nmp.name;} - const char *GetTypeName() {return "MsgPipe";} + const char *GetName() override { return nmp.name; } + const char *GetTypeName() override { return "MsgPipe"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_MPPID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Mpipe; } - int GetIDType() const { return SCE_KERNEL_TMID_Mpipe; } + int GetIDType() const override { return SCE_KERNEL_TMID_Mpipe; } MsgPipe() : buffer(0) {} ~MsgPipe() @@ -270,7 +270,7 @@ struct MsgPipe : public KernelObject HLEKernel::RemoveWaitingThread(sendWaitingThreads, threadID); } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("MsgPipe", 1); if (!s) diff --git a/Core/HLE/sceKernelMutex.cpp b/Core/HLE/sceKernelMutex.cpp index 9b17e08ef7..79e1e453ee 100644 --- a/Core/HLE/sceKernelMutex.cpp +++ b/Core/HLE/sceKernelMutex.cpp @@ -72,13 +72,13 @@ struct NativeMutex struct Mutex : public KernelObject { - const char *GetName() {return nm.name;} - const char *GetTypeName() {return "Mutex";} + const char *GetName() override { return nm.name; } + const char *GetTypeName() override { return "Mutex"; } static u32 GetMissingErrorCode() { return PSP_MUTEX_ERROR_NO_SUCH_MUTEX; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Mutex; } - int GetIDType() const { return SCE_KERNEL_TMID_Mutex; } + int GetIDType() const override { return SCE_KERNEL_TMID_Mutex; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Mutex", 1); if (!s) @@ -137,13 +137,13 @@ struct NativeLwMutex struct LwMutex : public KernelObject { - const char *GetName() {return nm.name;} - const char *GetTypeName() {return "LwMutex";} + const char *GetName() override { return nm.name; } + const char *GetTypeName() override { return "LwMutex"; } static u32 GetMissingErrorCode() { return PSP_LWMUTEX_ERROR_NO_SUCH_LWMUTEX; } static int GetStaticIDType() { return SCE_KERNEL_TMID_LwMutex; } - int GetIDType() const { return SCE_KERNEL_TMID_LwMutex; } + int GetIDType() const override { return SCE_KERNEL_TMID_LwMutex; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("LwMutex", 1); if (!s) diff --git a/Core/HLE/sceKernelSemaphore.cpp b/Core/HLE/sceKernelSemaphore.cpp index f7cc1e9c8b..3f6ef40c9a 100644 --- a/Core/HLE/sceKernelSemaphore.cpp +++ b/Core/HLE/sceKernelSemaphore.cpp @@ -55,14 +55,14 @@ struct NativeSemaphore struct Semaphore : public KernelObject { - const char *GetName() {return ns.name;} - const char *GetTypeName() {return "Semaphore";} + const char *GetName() override { return ns.name; } + const char *GetTypeName() override { return "Semaphore"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_SEMID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Semaphore; } - int GetIDType() const { return SCE_KERNEL_TMID_Semaphore; } + int GetIDType() const override { return SCE_KERNEL_TMID_Semaphore; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Semaphore", 1); if (!s) diff --git a/Core/HLE/sceKernelThread.cpp b/Core/HLE/sceKernelThread.cpp index 895545bfd6..6a0fd56547 100644 --- a/Core/HLE/sceKernelThread.cpp +++ b/Core/HLE/sceKernelThread.cpp @@ -120,10 +120,10 @@ struct NativeCallback class Callback : public KernelObject { public: - const char *GetName() {return nc.name;} - const char *GetTypeName() {return "CallBack";} + const char *GetName() override { return nc.name; } + const char *GetTypeName() override { return "CallBack"; } - void GetQuickInfo(char *ptr, int size) + void GetQuickInfo(char *ptr, int size) override { sprintf(ptr, "thread=%i, argument= %08x", //hackAddress, @@ -137,9 +137,9 @@ public: static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_CBID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Callback; } - int GetIDType() const { return SCE_KERNEL_TMID_Callback; } + int GetIDType() const override { return SCE_KERNEL_TMID_Callback; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Callback", 1); if (!s) @@ -287,14 +287,14 @@ class ActionAfterMipsCall : public Action } public: - virtual void run(MipsCall &call); + void run(MipsCall &call) override; static Action *Create() { return new ActionAfterMipsCall(); } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("ActionAfterMipsCall", 1); if (!s) @@ -338,7 +338,7 @@ class ActionAfterCallback : public Action { public: ActionAfterCallback() {} - virtual void run(MipsCall &call); + void run(MipsCall &call) override; static Action *Create() { @@ -350,7 +350,7 @@ public: cbId = cbId_; } - void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("ActionAfterCallback", 1); if (!s) @@ -365,9 +365,9 @@ public: class Thread : public KernelObject { public: - const char *GetName() {return nt.name;} - const char *GetTypeName() {return "Thread";} - void GetQuickInfo(char *ptr, int size) + const char *GetName() override { return nt.name; } + const char *GetTypeName() override { return "Thread"; } + void GetQuickInfo(char *ptr, int size) override { sprintf(ptr, "pc= %08x sp= %08x %s %s %s %s %s %s (wt=%i wid=%i wv= %08x )", context.pc, context.r[MIPS_REG_SP], @@ -384,7 +384,7 @@ public: static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_THID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Thread; } - int GetIDType() const { return SCE_KERNEL_TMID_Thread; } + int GetIDType() const override { return SCE_KERNEL_TMID_Thread; } bool AllocateStack(u32 &stackSize) { @@ -518,7 +518,7 @@ public: inline bool isWaiting() const { return (nt.status & THREADSTATUS_WAIT) != 0; } inline bool isSuspended() const { return (nt.status & THREADSTATUS_SUSPEND) != 0; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Thread", 1, 4); if (!s) diff --git a/Core/HLE/sceKernelVTimer.cpp b/Core/HLE/sceKernelVTimer.cpp index 73f992d828..3e8e2a6fbe 100644 --- a/Core/HLE/sceKernelVTimer.cpp +++ b/Core/HLE/sceKernelVTimer.cpp @@ -42,13 +42,13 @@ struct NativeVTimer { }; struct VTimer : public KernelObject { - const char *GetName() {return nvt.name;} - const char *GetTypeName() {return "VTimer";} + const char *GetName() override { return nvt.name; } + const char *GetTypeName() override { return "VTimer"; } static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_VTID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_VTimer; } - int GetIDType() const { return SCE_KERNEL_TMID_VTimer; } + int GetIDType() const override { return SCE_KERNEL_TMID_VTimer; } - virtual void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("VTimer", 1, 2); if (!s) return; @@ -131,7 +131,7 @@ class VTimerIntrHandler : public IntrHandler public: VTimerIntrHandler() : IntrHandler(PSP_SYSTIMER1_INTR) {} - virtual bool run(PendingInterrupt &pend) { + bool run(PendingInterrupt &pend) override { u32 error; SceUID vtimerID = vtimers.front(); @@ -158,7 +158,7 @@ public: return true; } - virtual void handleResult(PendingInterrupt &pend) { + void handleResult(PendingInterrupt &pend) override { u32 result = currentMIPS->r[MIPS_REG_V0]; currentMIPS->r[MIPS_REG_SP] += HANDLER_STACK_SPACE; diff --git a/Core/HLE/sceMpeg.cpp b/Core/HLE/sceMpeg.cpp index 6c989e8477..4f3e9a447f 100644 --- a/Core/HLE/sceMpeg.cpp +++ b/Core/HLE/sceMpeg.cpp @@ -343,14 +343,14 @@ public: PostPutAction() {} void setRingAddr(u32 ringAddr) { ringAddr_ = ringAddr; } static Action *Create() { return new PostPutAction; } - void DoState(PointerWrap &p) { - auto s = p.Section("PostPutAction", 1); - if (!s) - return; + void DoState(PointerWrap &p) override { + auto s = p.Section("PostPutAction", 1); + if (!s) + return; p.Do(ringAddr_); } - void run(MipsCall &call); + void run(MipsCall &call) override; private: u32 ringAddr_; }; diff --git a/Core/MIPS/MIPSDebugInterface.cpp b/Core/MIPS/MIPSDebugInterface.cpp index 609b8ade6b..1575e37d09 100644 --- a/Core/MIPS/MIPSDebugInterface.cpp +++ b/Core/MIPS/MIPSDebugInterface.cpp @@ -45,7 +45,7 @@ class MipsExpressionFunctions: public IExpressionFunctions public: MipsExpressionFunctions(DebugInterface* cpu): cpu(cpu) { }; - virtual bool parseReference(char* str, uint32& referenceIndex) + bool parseReference(char* str, uint32& referenceIndex) override { for (int i = 0; i < 32; i++) { @@ -109,12 +109,12 @@ public: return false; } - virtual bool parseSymbol(char* str, uint32& symbolValue) + bool parseSymbol(char* str, uint32& symbolValue) override { return symbolMap.GetLabelValue(str,symbolValue); } - virtual uint32 getReferenceValue(uint32 referenceIndex) + uint32 getReferenceValue(uint32 referenceIndex) override { if (referenceIndex < 32) return cpu->GetRegValue(0, referenceIndex); @@ -131,14 +131,14 @@ public: return -1; } - virtual ExpressionType getReferenceType(uint32 referenceIndex) { + ExpressionType getReferenceType(uint32 referenceIndex) override { if (referenceIndex & REF_INDEX_IS_FLOAT) { return EXPR_TYPE_FLOAT; } return EXPR_TYPE_UINT; } - virtual bool getMemoryValue(uint32 address, int size, uint32& dest, char* error) + bool getMemoryValue(uint32 address, int size, uint32& dest, char* error) override { switch (size) { diff --git a/Core/MIPS/MIPSDebugInterface.h b/Core/MIPS/MIPSDebugInterface.h index 969bed7060..31cbdde414 100644 --- a/Core/MIPS/MIPSDebugInterface.h +++ b/Core/MIPS/MIPSDebugInterface.h @@ -27,77 +27,77 @@ class MIPSDebugInterface : public DebugInterface { MIPSState *cpu; public: - MIPSDebugInterface(MIPSState *_cpu){cpu=_cpu;} - virtual const char *disasm(unsigned int address, unsigned int align); - virtual int getInstructionSize(int instruction) {return 4;} - virtual bool isAlive(); - virtual bool isBreakpoint(unsigned int address); - virtual void setBreakpoint(unsigned int address); - virtual void clearBreakpoint(unsigned int address); - virtual void clearAllBreakpoints(); - virtual void toggleBreakpoint(unsigned int address); - virtual unsigned int readMemory(unsigned int address); - virtual unsigned int getPC() { return cpu->pc; } - virtual void setPC(unsigned int address) {cpu->pc = address;} - virtual void step() {} - virtual void runToBreakpoint(); - virtual int getColor(unsigned int address); - virtual std::string getDescription(unsigned int address); - virtual bool initExpression(const char* exp, PostfixExpression& dest); - virtual bool parseExpression(PostfixExpression& exp, u32& dest); + MIPSDebugInterface(MIPSState *_cpu) { cpu = _cpu; } + const char *disasm(unsigned int address, unsigned int align) override; + int getInstructionSize(int instruction) override { return 4; } + bool isAlive() override; + bool isBreakpoint(unsigned int address) override; + void setBreakpoint(unsigned int address) override; + void clearBreakpoint(unsigned int address) override; + void clearAllBreakpoints() override; + void toggleBreakpoint(unsigned int address) override; + unsigned int readMemory(unsigned int address) override; + unsigned int getPC() override { return cpu->pc; } + void setPC(unsigned int address) override { cpu->pc = address; } + void step() override {} + void runToBreakpoint() override; + int getColor(unsigned int address) override; + std::string getDescription(unsigned int address) override; + bool initExpression(const char* exp, PostfixExpression& dest) override; + bool parseExpression(PostfixExpression& exp, u32& dest) override; //overridden functions - const char *GetName(); - int GetGPRSize() { return GPR_SIZE_32;} - u32 GetGPR32Value(int reg) {return cpu->r[reg];} - u32 GetPC() {return cpu->pc;} - u32 GetLR() {return cpu->r[MIPS_REG_RA];} - void SetPC(u32 _pc) {cpu->pc=_pc;} + const char *GetName() override; + int GetGPRSize() override { return GPR_SIZE_32; } + u32 GetGPR32Value(int reg) override { return cpu->r[reg]; } + u32 GetPC() override { return cpu->pc; } + u32 GetLR() override { return cpu->r[MIPS_REG_RA]; } + void SetPC(u32 _pc) override { cpu->pc = _pc; } - const char *GetCategoryName(int cat) + const char *GetCategoryName(int cat) override { const char *names[3] = {("GPR"),("FPU"),("VFPU")}; return names[cat]; } - int GetNumCategories() { return 3; } - int GetNumRegsInCategory(int cat) + int GetNumCategories() override { return 3; } + int GetNumRegsInCategory(int cat) override { int r[3] = {32,32,32}; return r[cat]; } - const char *GetRegName(int cat, int index); + const char *GetRegName(int cat, int index) override; - virtual void PrintRegValue(int cat, int index, char *out) + void PrintRegValue(int cat, int index, char *out) override { switch (cat) { - case 0: sprintf(out, "%08X", cpu->r[index]); break; - case 1: sprintf(out, "%f", cpu->f[index]); break; - case 2: sprintf(out, "N/A"); break; + case 0: sprintf(out, "%08X", cpu->r[index]); break; + case 1: sprintf(out, "%f", cpu->f[index]); break; + case 2: sprintf(out, "N/A"); break; } } - u32 GetHi() + u32 GetHi() override { return cpu->hi; } - u32 GetLo() + u32 GetLo() override { return cpu->lo; } - void SetHi(u32 val) + void SetHi(u32 val) override { cpu->hi = val; } - void SetLo(u32 val) + void SetLo(u32 val) override { cpu->lo = val; } - u32 GetRegValue(int cat, int index) + u32 GetRegValue(int cat, int index) override { u32 temp; switch (cat) @@ -118,7 +118,7 @@ public: } } - void SetRegValue(int cat, int index, u32 value) + void SetRegValue(int cat, int index, u32 value) override { switch (cat) { diff --git a/Core/PSPMixer.h b/Core/PSPMixer.h index a47ca4b3ad..b8f36cbd35 100644 --- a/Core/PSPMixer.h +++ b/Core/PSPMixer.h @@ -22,6 +22,6 @@ class PSPMixer : public PMixer { public: - int Mix(short *stereoout, int numSamples); + int Mix(short *stereoout, int numSamples) override; };