From fea7428fdb3afca86eb61b5a044efcd2c757b6ef Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 17 Oct 2015 02:55:10 -0400 Subject: [PATCH] Core: Add missing override specifiers --- Core/HLE/proAdhoc.h | 4 ++-- Core/HLE/sceKernelAlarm.cpp | 8 ++++---- Core/HLE/sceKernelModule.cpp | 4 ++-- Core/HW/AsyncIOManager.h | 4 ++-- Core/MIPS/MIPSAsm.cpp | 16 ++++++++-------- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Core/HLE/proAdhoc.h b/Core/HLE/proAdhoc.h index 026715e3ec..b8a0d97d5e 100644 --- a/Core/HLE/proAdhoc.h +++ b/Core/HLE/proAdhoc.h @@ -765,7 +765,7 @@ class AfterMatchingMipsCall : public Action { public: AfterMatchingMipsCall() {} static Action *Create() { return new AfterMatchingMipsCall(); } - void DoState(PointerWrap &p) { + void DoState(PointerWrap &p) override { auto s = p.Section("AfterMatchingMipsCall", 1, 2); if (!s) return; @@ -773,7 +773,7 @@ public: p.Do(EventID); //context = NULL; } - void run(MipsCall &call); + void run(MipsCall &call) override; void SetContextID(u32 ContextID, u32 eventId); void SetContext(SceNetAdhocMatchingContext *Context, u32 eventId) { context = Context; EventID = eventId; } diff --git a/Core/HLE/sceKernelAlarm.cpp b/Core/HLE/sceKernelAlarm.cpp index a234ac4f13..bed6e58e08 100644 --- a/Core/HLE/sceKernelAlarm.cpp +++ b/Core/HLE/sceKernelAlarm.cpp @@ -39,13 +39,13 @@ struct NativeAlarm struct Alarm : public KernelObject { - const char *GetName() {return "[Alarm]";} - const char *GetTypeName() {return "Alarm";} + const char *GetName() override {return "[Alarm]";} + const char *GetTypeName() override {return "Alarm";} static u32 GetMissingErrorCode() { return SCE_KERNEL_ERROR_UNKNOWN_ALMID; } static int GetStaticIDType() { return SCE_KERNEL_TMID_Alarm; } - int GetIDType() const { return SCE_KERNEL_TMID_Alarm; } + int GetIDType() const override { return SCE_KERNEL_TMID_Alarm; } - virtual void DoState(PointerWrap &p) + void DoState(PointerWrap &p) override { auto s = p.Section("Alarm", 1); if (!s) diff --git a/Core/HLE/sceKernelModule.cpp b/Core/HLE/sceKernelModule.cpp index ce320804cd..bea14e8f18 100644 --- a/Core/HLE/sceKernelModule.cpp +++ b/Core/HLE/sceKernelModule.cpp @@ -386,8 +386,8 @@ public: AfterModuleEntryCall() {} SceUID moduleID_; u32 retValAddr; - virtual void run(MipsCall &call); - virtual void DoState(PointerWrap &p) { + void run(MipsCall &call) override; + void DoState(PointerWrap &p) override { auto s = p.Section("AfterModuleEntryCall", 1); if (!s) return; diff --git a/Core/HW/AsyncIOManager.h b/Core/HW/AsyncIOManager.h index 09c9883de4..d73f8a44ae 100644 --- a/Core/HW/AsyncIOManager.h +++ b/Core/HW/AsyncIOManager.h @@ -83,8 +83,8 @@ public: u64 ResultFinishTicks(u32 handle); protected: - virtual void ProcessEvent(AsyncIOEvent ref); - virtual bool ShouldExitEventLoop() { + void ProcessEvent(AsyncIOEvent ref) override; + bool ShouldExitEventLoop() override { return coreState == CORE_ERROR || coreState == CORE_POWERDOWN; } diff --git a/Core/MIPS/MIPSAsm.cpp b/Core/MIPS/MIPSAsm.cpp index b4a81c30be..2136d6511e 100644 --- a/Core/MIPS/MIPSAsm.cpp +++ b/Core/MIPS/MIPSAsm.cpp @@ -31,10 +31,10 @@ public: address = 0; } - virtual bool open(bool onlyCheck) { return true; }; - virtual void close() { }; - virtual bool isOpen() { return true; }; - virtual bool write(void* data, size_t length) + bool open(bool onlyCheck) override{ return true; }; + void close() override { }; + bool isOpen() override { return true; }; + bool write(void* data, size_t length) override { if (!Memory::IsValidAddress((u32)(address+length-1))) return false; @@ -48,16 +48,16 @@ public: address += length; return true; } - virtual u64 getVirtualAddress() { return address; }; - virtual u64 getPhysicalAddress() { return getVirtualAddress(); }; - virtual bool seekVirtual(u64 virtualAddress) + u64 getVirtualAddress() override { return address; }; + u64 getPhysicalAddress() override { return getVirtualAddress(); }; + bool seekVirtual(u64 virtualAddress) override { if (!Memory::IsValidAddress(virtualAddress)) return false; address = virtualAddress; return true; } - virtual bool seekPhysical(u64 physicalAddress) { return seekVirtual(physicalAddress); } + bool seekPhysical(u64 physicalAddress) override { return seekVirtual(physicalAddress); } private: u64 address; };