From f44852bb18ddaa759b3b86ba357360bca6375a8b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 10 Dec 2022 20:32:12 -0800 Subject: [PATCH] Global: Cleanup virtual/override specifiers. Also missing virtual destructors, hidden non-overrides, etc. --- Common/CodeBlock.h | 5 +- Common/ConsoleListener.h | 2 +- Common/Data/Text/WrapText.h | 1 + Common/File/VFS/AssetReader.h | 8 ++-- Common/GPU/D3D9/thin3d_d3d9.cpp | 6 +-- Common/GPU/OpenGL/thin3d_gl.cpp | 4 +- Common/GPU/Vulkan/thin3d_vulkan.cpp | 4 +- Common/GPU/thin3d.h | 5 +- Common/LogManager.h | 13 +++-- Common/Math/expression_parser.h | 1 + Common/Net/URL.h | 11 ++--- Common/UI/UI.h | 5 +- Common/UI/UIScreen.h | 34 ++++++------- Common/UI/ViewGroup.h | 48 +++++++++---------- Core/Debugger/DebugInterface.h | 2 + Core/Debugger/DisassemblyManager.h | 8 +--- Core/Debugger/WebSocket/DisasmSubscriber.cpp | 2 +- .../WebSocket/GPURecordSubscriber.cpp | 2 +- .../Debugger/WebSocket/GPUStatsSubscriber.cpp | 2 +- .../WebSocket/MemoryInfoSubscriber.cpp | 2 +- .../Debugger/WebSocket/SteppingSubscriber.cpp | 2 +- Core/Dialog/PSPGamedataInstallDialog.h | 10 ++-- Core/Dialog/PSPMsgDialog.h | 14 +++--- Core/Dialog/PSPNetconfDialog.h | 12 ++--- Core/Dialog/PSPNpSigninDialog.h | 12 ++--- Core/Dialog/PSPOskDialog.h | 14 +++--- Core/Dialog/PSPPlaceholderDialog.h | 6 +-- Core/Dialog/PSPSaveDialog.h | 14 +++--- Core/Dialog/PSPScreenshotDialog.h | 12 ++--- Core/FileLoaders/CachingFileLoader.h | 2 +- Core/FileLoaders/DiskCachingFileLoader.h | 2 +- Core/FileLoaders/HTTPFileLoader.h | 16 +++---- Core/FileLoaders/LocalFileLoader.h | 12 ++--- Core/FileLoaders/RamCachingFileLoader.h | 2 +- Core/FileSystems/FileSystem.h | 22 ++++----- Core/Loaders.h | 2 +- Core/MIPS/IR/IRJit.h | 2 +- Core/MIPS/x86/IRToX86.h | 2 +- Core/MIPS/x86/Jit.h | 2 +- Core/Screenshot.cpp | 2 +- Core/ThreadEventQueue.h | 2 + GPU/Common/GPUDebugInterface.h | 1 + GPU/Common/SplineCommon.h | 6 +-- GPU/D3D11/DrawEngineD3D11.h | 2 +- GPU/D3D11/GPU_D3D11.h | 3 -- GPU/Directx9/DrawEngineDX9.h | 2 +- GPU/Directx9/GPU_DX9.h | 3 -- GPU/GLES/DrawEngineGLES.cpp | 4 -- GPU/GLES/DrawEngineGLES.h | 4 +- GPU/GLES/GPU_GLES.h | 3 -- GPU/GPUCommon.h | 2 +- GPU/Vulkan/DrawEngineVulkan.h | 2 +- GPU/Vulkan/GPU_Vulkan.h | 3 -- GPU/Vulkan/TextureCacheVulkan.cpp | 4 +- GPU/Vulkan/TextureCacheVulkan.h | 2 +- Qt/QtHost.h | 26 +++++----- UI/DisplayLayoutScreen.cpp | 2 +- UI/GameInfoCache.cpp | 2 +- UI/InstallZipScreen.h | 6 +-- UI/MainScreen.cpp | 9 +--- UI/MainScreen.h | 1 - UI/MiscScreens.cpp | 9 +--- UI/MiscScreens.h | 4 +- UI/PauseScreen.h | 2 +- UI/RemoteISOScreen.h | 2 +- UI/ReportScreen.cpp | 16 +++---- UI/TouchControlLayoutScreen.h | 16 +++---- Windows/CaptureDevice.h | 14 +++--- Windows/DSoundStream.h | 2 +- Windows/Debugger/Debugger_Lists.h | 41 ++++++++-------- Windows/Debugger/Debugger_MemoryDlg.h | 6 +-- Windows/Debugger/Debugger_VFPUDlg.h | 4 +- Windows/DinputDevice.h | 2 +- Windows/GEDebugger/GEDebugger.h | 4 +- Windows/GEDebugger/TabDisplayLists.h | 28 ++++++----- Windows/GEDebugger/TabState.h | 2 +- Windows/GEDebugger/TabVertices.h | 14 +++--- Windows/WASAPIStream.cpp | 2 +- Windows/WASAPIStream.h | 2 +- Windows/XinputDevice.h | 2 +- headless/Compare.cpp | 4 +- headless/Headless.cpp | 2 +- unittest/TestThreadManager.cpp | 4 +- 83 files changed, 283 insertions(+), 315 deletions(-) diff --git a/Common/CodeBlock.h b/Common/CodeBlock.h index e76bbf40ce..0307cf9df6 100644 --- a/Common/CodeBlock.h +++ b/Common/CodeBlock.h @@ -57,7 +57,10 @@ private: public: CodeBlock() {} - virtual ~CodeBlock() { if (region) FreeCodeSpace(); } + ~CodeBlock() { + if (region) + FreeCodeSpace(); + } // Call this before you generate any code. void AllocCodeSpace(int size) { diff --git a/Common/ConsoleListener.h b/Common/ConsoleListener.h index 976e7531cd..32a32b7981 100644 --- a/Common/ConsoleListener.h +++ b/Common/ConsoleListener.h @@ -41,7 +41,7 @@ public: #if defined(USING_WIN_UI) COORD GetCoordinates(int BytesRead, int BufferWidth); #endif - void Log(const LogMessage &message); + void Log(const LogMessage &message) override; void ClearScreen(bool Cursor = true); void Show(bool bShow); diff --git a/Common/Data/Text/WrapText.h b/Common/Data/Text/WrapText.h index bcdd19a6fd..d51f860362 100644 --- a/Common/Data/Text/WrapText.h +++ b/Common/Data/Text/WrapText.h @@ -7,6 +7,7 @@ public: WordWrapper(const char *str, float maxW, int flags) : str_(str), maxW_(maxW), flags_(flags) { } + virtual ~WordWrapper() {} std::string Wrapped(); diff --git a/Common/File/VFS/AssetReader.h b/Common/File/VFS/AssetReader.h index df0c4f2821..36ccd60161 100644 --- a/Common/File/VFS/AssetReader.h +++ b/Common/File/VFS/AssetReader.h @@ -47,10 +47,10 @@ class DirectoryAssetReader : public AssetReader { public: explicit DirectoryAssetReader(const Path &path); // use delete[] - virtual uint8_t *ReadAsset(const char *path, size_t *size); - virtual bool GetFileListing(const char *path, std::vector *listing, const char *filter); - virtual bool GetFileInfo(const char *path, File::FileInfo *info); - virtual std::string toString() const { + uint8_t *ReadAsset(const char *path, size_t *size) override; + bool GetFileListing(const char *path, std::vector *listing, const char *filter) override; + bool GetFileInfo(const char *path, File::FileInfo *info) override; + std::string toString() const override { return path_.ToString(); } diff --git a/Common/GPU/D3D9/thin3d_d3d9.cpp b/Common/GPU/D3D9/thin3d_d3d9.cpp index e50eb3b1c8..94bce31760 100644 --- a/Common/GPU/D3D9/thin3d_d3d9.cpp +++ b/Common/GPU/D3D9/thin3d_d3d9.cpp @@ -291,7 +291,7 @@ public: D3D9Texture(LPDIRECT3DDEVICE9 device, LPDIRECT3DDEVICE9EX deviceEx, const TextureDesc &desc); ~D3D9Texture(); void SetToSampler(LPDIRECT3DDEVICE9 device, int sampler); - LPDIRECT3DBASETEXTURE9 Texture() const { + LPDIRECT3DBASETEXTURE9 TexturePtr() const { // TODO: Cleanup if (tex_) { return tex_; @@ -590,7 +590,7 @@ public: case NativeObject::DEVICE_EX: return (uint64_t)(uintptr_t)deviceEx_; case NativeObject::TEXTURE_VIEW: - return (uint64_t)(((D3D9Texture *)srcObject)->Texture()); + return (uint64_t)(((D3D9Texture *)srcObject)->TexturePtr()); default: return 0; } @@ -1007,7 +1007,7 @@ public: device->CreateVertexBuffer((UINT)size, usage, 0, D3DPOOL_DEFAULT, &vbuffer_, NULL); } } - virtual ~D3D9Buffer() override { + ~D3D9Buffer() { if (ibuffer_) { ibuffer_->Release(); } diff --git a/Common/GPU/OpenGL/thin3d_gl.cpp b/Common/GPU/OpenGL/thin3d_gl.cpp index 2536d2beea..6ea0ddc1dd 100644 --- a/Common/GPU/OpenGL/thin3d_gl.cpp +++ b/Common/GPU/OpenGL/thin3d_gl.cpp @@ -324,7 +324,7 @@ class OpenGLTexture; class OpenGLContext : public DrawContext { public: OpenGLContext(); - virtual ~OpenGLContext(); + ~OpenGLContext(); void SetTargetSize(int w, int h) override { DrawContext::SetTargetSize(w, h); @@ -1084,7 +1084,7 @@ public: buffer_ = render->CreateBuffer(target_, size, usage_); totalSize_ = size; } - ~OpenGLBuffer() override { + ~OpenGLBuffer() { render_->DeleteBuffer(buffer_); } diff --git a/Common/GPU/Vulkan/thin3d_vulkan.cpp b/Common/GPU/Vulkan/thin3d_vulkan.cpp index 9cfcbea7c9..bb57abdea4 100644 --- a/Common/GPU/Vulkan/thin3d_vulkan.cpp +++ b/Common/GPU/Vulkan/thin3d_vulkan.cpp @@ -382,7 +382,7 @@ class VKFramebuffer; class VKContext : public DrawContext { public: VKContext(VulkanContext *vulkan); - virtual ~VKContext(); + ~VKContext(); void DebugAnnotate(const char *annotation) override; @@ -1362,7 +1362,7 @@ public: VKBuffer(size_t size, uint32_t flags) : dataSize_(size) { data_ = new uint8_t[size]; } - ~VKBuffer() override { + ~VKBuffer() { delete[] data_; } diff --git a/Common/GPU/thin3d.h b/Common/GPU/thin3d.h index 78ae3375b8..76afa314be 100644 --- a/Common/GPU/thin3d.h +++ b/Common/GPU/thin3d.h @@ -483,10 +483,7 @@ public: virtual ShaderStage GetStage() const = 0; }; -class Pipeline : public RefCountedObject { -public: - virtual ~Pipeline() {} -}; +class Pipeline : public RefCountedObject { }; class RasterState : public RefCountedObject {}; diff --git a/Common/LogManager.h b/Common/LogManager.h index 65423b6121..5d8afddae5 100644 --- a/Common/LogManager.h +++ b/Common/LogManager.h @@ -55,7 +55,7 @@ public: FileLogListener(const char *filename); ~FileLogListener(); - void Log(const LogMessage &msg); + void Log(const LogMessage &msg) override; bool IsValid() { if (!fp_) return false; else return true; } bool IsEnabled() const { return m_enable; } @@ -71,13 +71,12 @@ private: class OutputDebugStringLogListener : public LogListener { public: - void Log(const LogMessage &msg); + void Log(const LogMessage &msg) override; }; class RingbufferLogListener : public LogListener { public: - RingbufferLogListener() : curMessage_(0), count_(0), enabled_(false) {} - void Log(const LogMessage &msg); + void Log(const LogMessage &msg) override; bool IsEnabled() const { return enabled_; } void SetEnabled(bool enable) { enabled_ = enable; } @@ -89,9 +88,9 @@ public: private: enum { MAX_LOGS = 128 }; LogMessage messages_[MAX_LOGS]; - int curMessage_; - int count_; - bool enabled_; + int curMessage_ = 0; + int count_ = 0; + bool enabled_ = false; }; // TODO: A simple buffered log that can be used to display the log in-window diff --git a/Common/Math/expression_parser.h b/Common/Math/expression_parser.h index 3d39340a42..55de0a234a 100644 --- a/Common/Math/expression_parser.h +++ b/Common/Math/expression_parser.h @@ -15,6 +15,7 @@ enum ExpressionType class IExpressionFunctions { public: + virtual ~IExpressionFunctions() {} virtual bool parseReference(char* str, uint32_t& referenceIndex) = 0; virtual bool parseSymbol(char* str, uint32_t& symbolValue) = 0; virtual uint32_t getReferenceValue(uint32_t referenceIndex) = 0; diff --git a/Common/Net/URL.h b/Common/Net/URL.h index 7fcaa0c455..e7f33e6d8a 100644 --- a/Common/Net/URL.h +++ b/Common/Net/URL.h @@ -15,6 +15,8 @@ struct UrlEncoder { + virtual ~UrlEncoder() {} + UrlEncoder() : paramCount(0) { data.reserve(256); @@ -129,8 +131,7 @@ struct MultipartFormDataEncoder : UrlEncoder boundary = temp; } - virtual void Add(const std::string &key, const std::string &value) - { + void Add(const std::string &key, const std::string &value) override { Add(key, value, "", ""); } @@ -158,13 +159,11 @@ struct MultipartFormDataEncoder : UrlEncoder Add(key, std::string((const char *)&value[0], value.size()), filename, mimeType); } - virtual void Finish() - { + void Finish() override { data += "--" + boundary + "--"; } - virtual std::string GetMimeType() const - { + std::string GetMimeType() const override { return "multipart/form-data; boundary=\"" + boundary + "\""; } diff --git a/Common/UI/UI.h b/Common/UI/UI.h index ccd6b50dbe..4357693d16 100644 --- a/Common/UI/UI.h +++ b/Common/UI/UI.h @@ -43,6 +43,7 @@ extern DrawBuffer ui_draw2d_front; // for things that need to be on top of the r // Implement this interface to style your lists class UIListAdapter { public: + virtual ~UIListAdapter() {} virtual size_t getCount() const = 0; virtual void drawItem(int item, int x, int y, int w, int h, bool active) const = 0; virtual float itemHeight(int itemIndex) const { return 64; } @@ -52,8 +53,8 @@ public: class StringVectorListAdapter : public UIListAdapter { public: StringVectorListAdapter(const std::vector *items) : items_(items) {} - virtual size_t getCount() const { return items_->size(); } - virtual void drawItem(int item, int x, int y, int w, int h, bool active) const; + size_t getCount() const override { return items_->size(); } + void drawItem(int item, int x, int y, int w, int h, bool active) const override; private: const std::vector *items_; diff --git a/Common/UI/UIScreen.h b/Common/UI/UIScreen.h index 03a8f8a18a..50a5f1f2d9 100644 --- a/Common/UI/UIScreen.h +++ b/Common/UI/UIScreen.h @@ -74,12 +74,12 @@ public: PopupScreen(std::string title, std::string button1 = "", std::string button2 = ""); virtual void CreatePopupContents(UI::ViewGroup *parent) = 0; - virtual void CreateViews() override; - virtual bool isTransparent() const override { return true; } - virtual bool touch(const TouchInput &touch) override; - virtual bool key(const KeyInput &key) override; + void CreateViews() override; + bool isTransparent() const override { return true; } + bool touch(const TouchInput &touch) override; + bool key(const KeyInput &key) override; - virtual void TriggerFinish(DialogResult result) override; + void TriggerFinish(DialogResult result) override; void SetPopupOrigin(const UI::View *view); void SetPopupOffset(float y); @@ -95,7 +95,7 @@ protected: virtual bool HasTitleBar() const { return true; } const std::string &Title() { return title_; } - virtual void update() override; + void update() override; private: UI::ViewGroup *box_; @@ -143,9 +143,9 @@ public: UI::Event OnChoice; protected: - virtual bool FillVertical() const override { return false; } - virtual bool ShowButtons() const override { return showButtons_; } - virtual void CreatePopupContents(UI::ViewGroup *parent) override; + bool FillVertical() const override { return false; } + bool ShowButtons() const override { return showButtons_; } + void CreatePopupContents(UI::ViewGroup *parent) override; UI::StringVectorListAdaptor adaptor_; UI::ListView *listView_ = nullptr; @@ -164,9 +164,9 @@ public: UI::Event OnChoice; protected: - virtual bool FillVertical() const override { return false; } - virtual bool ShowButtons() const override { return true; } - virtual void CreatePopupContents(UI::ViewGroup *parent) override; + bool FillVertical() const override { return false; } + bool ShowButtons() const override { return true; } + void CreatePopupContents(UI::ViewGroup *parent) override; private: void OnCompleted(DialogResult result) override; @@ -182,7 +182,7 @@ class SliderPopupScreen : public PopupScreen { public: SliderPopupScreen(int *value, int minValue, int maxValue, const std::string &title, int step = 1, const std::string &units = "") : PopupScreen(title, "OK", "Cancel"), units_(units), value_(value), minValue_(minValue), maxValue_(maxValue), step_(step) {} - virtual void CreatePopupContents(ViewGroup *parent) override; + void CreatePopupContents(ViewGroup *parent) override; void SetNegativeDisable(const std::string &str) { negativeLabel_ = str; @@ -198,7 +198,7 @@ private: EventReturn OnIncrease(EventParams ¶ms); EventReturn OnTextChange(EventParams ¶ms); EventReturn OnSliderChange(EventParams ¶ms); - virtual void OnCompleted(DialogResult result) override; + void OnCompleted(DialogResult result) override; Slider *slider_ = nullptr; UI::TextEdit *edit_ = nullptr; std::string units_; @@ -227,7 +227,7 @@ private: EventReturn OnDecrease(EventParams ¶ms); EventReturn OnTextChange(EventParams ¶ms); EventReturn OnSliderChange(EventParams ¶ms); - virtual void OnCompleted(DialogResult result) override; + void OnCompleted(DialogResult result) override; UI::SliderFloat *slider_; UI::TextEdit *edit_; std::string units_; @@ -245,7 +245,7 @@ class TextEditPopupScreen : public PopupScreen { public: TextEditPopupScreen(std::string *value, const std::string &placeholder, const std::string &title, int maxLen) : PopupScreen(title, "OK", "Cancel"), value_(value), placeholder_(placeholder), maxLen_(maxLen) {} - virtual void CreatePopupContents(ViewGroup *parent) override; + void CreatePopupContents(ViewGroup *parent) override; const char *tag() const override { return "TextEditPopup"; } @@ -378,7 +378,7 @@ public: } protected: - void PostChoiceCallback(int num) { + void PostChoiceCallback(int num) override { *valueStr_ = choices_[num]; } diff --git a/Common/UI/ViewGroup.h b/Common/UI/ViewGroup.h index d408548b69..32ddb8eb56 100644 --- a/Common/UI/ViewGroup.h +++ b/Common/UI/ViewGroup.h @@ -24,27 +24,23 @@ struct NeighborResult { class ViewGroup : public View { public: ViewGroup(LayoutParams *layoutParams = 0) : View(layoutParams) {} - virtual ~ViewGroup(); + ~ViewGroup(); // Pass through external events to children. - virtual bool Key(const KeyInput &input) override; - virtual bool Touch(const TouchInput &input) override; - virtual void Axis(const AxisInput &input) override; + bool Key(const KeyInput &input) override; + bool Touch(const TouchInput &input) override; + void Axis(const AxisInput &input) override; // By default, a container will layout to its own bounds. - virtual void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override = 0; - virtual void Layout() override = 0; - virtual void Update() override; - virtual void Query(float x, float y, std::vector &list) override; + void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override = 0; + void Layout() override = 0; + void Update() override; + void Query(float x, float y, std::vector &list) override; - virtual void DeviceLost() override; - virtual void DeviceRestored(Draw::DrawContext *draw) override; + void DeviceLost() override; + void DeviceRestored(Draw::DrawContext *draw) override; - virtual void Draw(UIContext &dc) override; - - // These should be unused. - virtual float GetContentWidth() const { return 0.0f; } - virtual float GetContentHeight() const { return 0.0f; } + void Draw(UIContext &dc) override; // Takes ownership! DO NOT add a view to multiple parents! template @@ -54,8 +50,8 @@ public: return view; } - virtual bool SetFocus() override; - virtual bool SubviewFocused(View *view) override; + bool SetFocus() override; + bool SubviewFocused(View *view) override; virtual void RemoveSubview(View *view); void SetDefaultFocusView(View *view) { defaultFocusView_ = view; } @@ -406,9 +402,9 @@ public: class ChoiceListAdaptor : public ListAdaptor { public: ChoiceListAdaptor(const char *items[], int numItems) : items_(items), numItems_(numItems) {} - virtual View *CreateItemView(int index); - virtual int GetNumItems() { return numItems_; } - virtual bool AddEventCallback(View *view, std::function callback); + View *CreateItemView(int index) override; + int GetNumItems() override { return numItems_; } + bool AddEventCallback(View *view, std::function callback) override; private: const char **items_; @@ -421,12 +417,12 @@ class StringVectorListAdaptor : public ListAdaptor { public: StringVectorListAdaptor() : selected_(-1) {} StringVectorListAdaptor(const std::vector &items, int selected = -1) : items_(items), selected_(selected) {} - virtual View *CreateItemView(int index) override; - virtual int GetNumItems() override { return (int)items_.size(); } - virtual bool AddEventCallback(View *view, std::function callback) override; + View *CreateItemView(int index) override; + int GetNumItems() override { return (int)items_.size(); } + bool AddEventCallback(View *view, std::function callback) override; void SetSelected(int sel) override { selected_ = sel; } - virtual std::string GetTitle(int index) const override { return items_[index]; } - virtual int GetSelected() override { return selected_; } + std::string GetTitle(int index) const override { return items_[index]; } + int GetSelected() override { return selected_; } private: std::vector items_; @@ -440,7 +436,7 @@ public: ListView(ListAdaptor *a, std::set hidden = std::set(), LayoutParams *layoutParams = 0); int GetSelected() { return adaptor_->GetSelected(); } - virtual void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override; + void Measure(const UIContext &dc, MeasureSpec horiz, MeasureSpec vert) override; virtual void SetMaxHeight(float mh) { maxHeight_ = mh; } Event OnChoice; std::string DescribeLog() const override { return "ListView: " + View::DescribeLog(); } diff --git a/Core/Debugger/DebugInterface.h b/Core/Debugger/DebugInterface.h index 6f48c7db0f..a92c8bab26 100644 --- a/Core/Debugger/DebugInterface.h +++ b/Core/Debugger/DebugInterface.h @@ -31,6 +31,8 @@ enum { class DebugInterface { public: + virtual ~DebugInterface() {} + virtual const char *disasm(unsigned int address, unsigned int align) {return "NODEBUGGER";} virtual int getInstructionSize(int instruction) {return 1;} diff --git a/Core/Debugger/DisassemblyManager.h b/Core/Debugger/DisassemblyManager.h index 00ff46c6fc..81520818b1 100644 --- a/Core/Debugger/DisassemblyManager.h +++ b/Core/Debugger/DisassemblyManager.h @@ -99,8 +99,7 @@ private: class DisassemblyOpcode: public DisassemblyEntry { public: - DisassemblyOpcode(u32 _address, int _num): address(_address), num(_num) { }; - virtual ~DisassemblyOpcode() { }; + DisassemblyOpcode(u32 _address, int _num): address(_address), num(_num) { } void recheck() override { }; int getNumLines() override { return num; }; int getLineNum(u32 address, bool findStart) override { return (address - this->address) / 4; }; @@ -118,8 +117,7 @@ private: class DisassemblyMacro: public DisassemblyEntry { public: - DisassemblyMacro(u32 _address): address(_address) { }; - virtual ~DisassemblyMacro() { }; + DisassemblyMacro(u32 _address): address(_address) { } void setMacroLi(u32 _immediate, u8 _rt); void setMacroMemory(std::string _name, u32 _immediate, u8 _rt, int _dataSize); @@ -147,7 +145,6 @@ class DisassemblyData: public DisassemblyEntry { public: DisassemblyData(u32 _address, u32 _size, DataType _type); - virtual ~DisassemblyData() { }; void recheck() override; int getNumLines() override { return (int)lines.size(); }; @@ -179,7 +176,6 @@ class DisassemblyComment: public DisassemblyEntry { public: DisassemblyComment(u32 _address, u32 _size, std::string name, std::string param); - virtual ~DisassemblyComment() { }; void recheck() override { }; int getNumLines() override { return 1; }; diff --git a/Core/Debugger/WebSocket/DisasmSubscriber.cpp b/Core/Debugger/WebSocket/DisasmSubscriber.cpp index 5d766785a2..d467a25cd8 100644 --- a/Core/Debugger/WebSocket/DisasmSubscriber.cpp +++ b/Core/Debugger/WebSocket/DisasmSubscriber.cpp @@ -36,7 +36,7 @@ public: WebSocketDisasmState() { disasm_.setCpu(currentDebugMIPS); } - ~WebSocketDisasmState() override { + ~WebSocketDisasmState() { disasm_.clear(); } diff --git a/Core/Debugger/WebSocket/GPURecordSubscriber.cpp b/Core/Debugger/WebSocket/GPURecordSubscriber.cpp index f31aa26d54..f1aad51e12 100644 --- a/Core/Debugger/WebSocket/GPURecordSubscriber.cpp +++ b/Core/Debugger/WebSocket/GPURecordSubscriber.cpp @@ -23,7 +23,7 @@ #include "GPU/Debugger/Record.h" struct WebSocketGPURecordState : public DebuggerSubscriber { - ~WebSocketGPURecordState() override; + ~WebSocketGPURecordState(); void Dump(DebuggerRequest &req); void Broadcast(net::WebSocketServer *ws) override; diff --git a/Core/Debugger/WebSocket/GPUStatsSubscriber.cpp b/Core/Debugger/WebSocket/GPUStatsSubscriber.cpp index 0d579b6747..1135ad98a2 100644 --- a/Core/Debugger/WebSocket/GPUStatsSubscriber.cpp +++ b/Core/Debugger/WebSocket/GPUStatsSubscriber.cpp @@ -68,7 +68,7 @@ struct DebuggerGPUStatsEvent { struct WebSocketGPUStatsState : public DebuggerSubscriber { WebSocketGPUStatsState(); - ~WebSocketGPUStatsState() override; + ~WebSocketGPUStatsState(); void Get(DebuggerRequest &req); void Feed(DebuggerRequest &req); diff --git a/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp b/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp index 30eb8cdd02..139b9124ec 100644 --- a/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp +++ b/Core/Debugger/WebSocket/MemoryInfoSubscriber.cpp @@ -27,7 +27,7 @@ class WebSocketMemoryInfoState : public DebuggerSubscriber { public: WebSocketMemoryInfoState() { } - ~WebSocketMemoryInfoState() override { + ~WebSocketMemoryInfoState() { UpdateOverride(false); } diff --git a/Core/Debugger/WebSocket/SteppingSubscriber.cpp b/Core/Debugger/WebSocket/SteppingSubscriber.cpp index fcb9296985..b07349a26b 100644 --- a/Core/Debugger/WebSocket/SteppingSubscriber.cpp +++ b/Core/Debugger/WebSocket/SteppingSubscriber.cpp @@ -32,7 +32,7 @@ struct WebSocketSteppingState : public DebuggerSubscriber { WebSocketSteppingState() { disasm_.setCpu(currentDebugMIPS); } - ~WebSocketSteppingState() override { + ~WebSocketSteppingState() { disasm_.clear(); } diff --git a/Core/Dialog/PSPGamedataInstallDialog.h b/Core/Dialog/PSPGamedataInstallDialog.h index a74fdb5254..47febcff9f 100644 --- a/Core/Dialog/PSPGamedataInstallDialog.h +++ b/Core/Dialog/PSPGamedataInstallDialog.h @@ -36,12 +36,12 @@ struct SceUtilityGamedataInstallParam { class PSPGamedataInstallDialog: public PSPDialog { public: PSPGamedataInstallDialog(UtilityDialogType type); - virtual ~PSPGamedataInstallDialog(); + ~PSPGamedataInstallDialog(); - virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed) override; - virtual int Shutdown(bool force = false) override; - virtual void DoState(PointerWrap &p) override; + int Init(u32 paramAddr); + int Update(int animSpeed) override; + int Shutdown(bool force = false) override; + 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 78ee4e54f4..32a4831640 100644 --- a/Core/Dialog/PSPMsgDialog.h +++ b/Core/Dialog/PSPMsgDialog.h @@ -59,18 +59,18 @@ struct pspMessageDialog class PSPMsgDialog: public PSPDialog { public: PSPMsgDialog(UtilityDialogType type); - virtual ~PSPMsgDialog(); + ~PSPMsgDialog(); - virtual int Init(unsigned int paramAddr); - virtual int Update(int animSpeed) override; - virtual int Shutdown(bool force = false) override; - virtual void DoState(PointerWrap &p) override; - virtual pspUtilityDialogCommon *GetCommonParam() override; + int Init(unsigned int paramAddr); + int Update(int animSpeed) override; + int Shutdown(bool force = false) override; + void DoState(PointerWrap &p) override; + pspUtilityDialogCommon *GetCommonParam() override; int Abort(); protected: - virtual bool UseAutoStatus() override { + bool UseAutoStatus() override { return false; } diff --git a/Core/Dialog/PSPNetconfDialog.h b/Core/Dialog/PSPNetconfDialog.h index 13d267f5d9..52a3ce203a 100644 --- a/Core/Dialog/PSPNetconfDialog.h +++ b/Core/Dialog/PSPNetconfDialog.h @@ -38,13 +38,13 @@ struct SceUtilityNetconfParam { class PSPNetconfDialog: public PSPDialog { public: PSPNetconfDialog(UtilityDialogType type); - virtual ~PSPNetconfDialog(); + ~PSPNetconfDialog(); - virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed) override; - virtual int Shutdown(bool force = false) override; - virtual void DoState(PointerWrap &p) override; - virtual pspUtilityDialogCommon* GetCommonParam() override; + int Init(u32 paramAddr); + int Update(int animSpeed) override; + int Shutdown(bool force = false) override; + void DoState(PointerWrap &p) override; + pspUtilityDialogCommon* GetCommonParam() override; protected: bool UseAutoStatus() override { diff --git a/Core/Dialog/PSPNpSigninDialog.h b/Core/Dialog/PSPNpSigninDialog.h index 15aac7b0c9..2b31922735 100644 --- a/Core/Dialog/PSPNpSigninDialog.h +++ b/Core/Dialog/PSPNpSigninDialog.h @@ -34,13 +34,13 @@ struct SceUtilityNpSigninParam { class PSPNpSigninDialog: public PSPDialog { public: PSPNpSigninDialog(UtilityDialogType type); - virtual ~PSPNpSigninDialog(); + ~PSPNpSigninDialog(); - virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed) override; - virtual int Shutdown(bool force = false) override; - virtual void DoState(PointerWrap &p) override; - virtual pspUtilityDialogCommon* GetCommonParam() override; + int Init(u32 paramAddr); + int Update(int animSpeed) override; + int Shutdown(bool force = false) override; + void DoState(PointerWrap &p) override; + pspUtilityDialogCommon* GetCommonParam() override; protected: bool UseAutoStatus() override { diff --git a/Core/Dialog/PSPOskDialog.h b/Core/Dialog/PSPOskDialog.h index c760afb1e4..b4aeefc745 100644 --- a/Core/Dialog/PSPOskDialog.h +++ b/Core/Dialog/PSPOskDialog.h @@ -213,16 +213,16 @@ enum class PSPOskNativeStatus { class PSPOskDialog: public PSPDialog { public: PSPOskDialog(UtilityDialogType type); - virtual ~PSPOskDialog(); + ~PSPOskDialog(); - virtual int Init(u32 oskPtr); - virtual int Update(int animSpeed) override; - virtual int Shutdown(bool force = false) override; - virtual void DoState(PointerWrap &p) override; - virtual pspUtilityDialogCommon *GetCommonParam() override; + int Init(u32 oskPtr); + int Update(int animSpeed) override; + int Shutdown(bool force = false) override; + void DoState(PointerWrap &p) override; + pspUtilityDialogCommon *GetCommonParam() override; protected: - virtual bool UseAutoStatus() override { + bool UseAutoStatus() override { return false; } diff --git a/Core/Dialog/PSPPlaceholderDialog.h b/Core/Dialog/PSPPlaceholderDialog.h index 4c81efe636..b494d92944 100644 --- a/Core/Dialog/PSPPlaceholderDialog.h +++ b/Core/Dialog/PSPPlaceholderDialog.h @@ -22,9 +22,9 @@ class PSPPlaceholderDialog: public PSPDialog { public: PSPPlaceholderDialog(UtilityDialogType type); - virtual ~PSPPlaceholderDialog(); + ~PSPPlaceholderDialog(); - virtual int Init(); - virtual int Update(int animSpeed) override; + int Init(); + int Update(int animSpeed) override; }; diff --git a/Core/Dialog/PSPSaveDialog.h b/Core/Dialog/PSPSaveDialog.h index 90f8d6312a..be6024ac52 100644 --- a/Core/Dialog/PSPSaveDialog.h +++ b/Core/Dialog/PSPSaveDialog.h @@ -72,18 +72,18 @@ class PSPSaveDialog: public PSPDialog { public: PSPSaveDialog(UtilityDialogType type); - virtual ~PSPSaveDialog(); + ~PSPSaveDialog(); - virtual int Init(int paramAddr); - virtual int Update(int animSpeed) override; - virtual int Shutdown(bool force = false) override; - virtual void DoState(PointerWrap &p) override; - virtual pspUtilityDialogCommon *GetCommonParam() override; + int Init(int paramAddr); + int Update(int animSpeed) override; + int Shutdown(bool force = false) override; + void DoState(PointerWrap &p) override; + pspUtilityDialogCommon *GetCommonParam() override; void ExecuteIOAction(); protected: - virtual bool UseAutoStatus() override { + bool UseAutoStatus() override { return false; } diff --git a/Core/Dialog/PSPScreenshotDialog.h b/Core/Dialog/PSPScreenshotDialog.h index ae83e9e8ca..760cd8fcc7 100644 --- a/Core/Dialog/PSPScreenshotDialog.h +++ b/Core/Dialog/PSPScreenshotDialog.h @@ -25,13 +25,13 @@ struct SceUtilityScreenshotParams; class PSPScreenshotDialog : public PSPDialog { public: PSPScreenshotDialog(UtilityDialogType type); - virtual ~PSPScreenshotDialog(); + ~PSPScreenshotDialog(); - virtual int Init(u32 paramAddr); - virtual int Update(int animSpeed) override; - virtual int ContStart(); - virtual void DoState(PointerWrap &p) override; - virtual pspUtilityDialogCommon *GetCommonParam() override; + int Init(u32 paramAddr); + int Update(int animSpeed) override; + int ContStart(); + void DoState(PointerWrap &p) override; + pspUtilityDialogCommon *GetCommonParam() override; protected: // TODO: Manage status correctly. diff --git a/Core/FileLoaders/CachingFileLoader.h b/Core/FileLoaders/CachingFileLoader.h index e778265cce..a4299b567d 100644 --- a/Core/FileLoaders/CachingFileLoader.h +++ b/Core/FileLoaders/CachingFileLoader.h @@ -27,7 +27,7 @@ class CachingFileLoader : public ProxiedFileLoader { public: CachingFileLoader(FileLoader *backend); - ~CachingFileLoader() override; + ~CachingFileLoader(); bool Exists() override; bool ExistsFast() override; diff --git a/Core/FileLoaders/DiskCachingFileLoader.h b/Core/FileLoaders/DiskCachingFileLoader.h index bfbf780c2b..a9b75f4406 100644 --- a/Core/FileLoaders/DiskCachingFileLoader.h +++ b/Core/FileLoaders/DiskCachingFileLoader.h @@ -31,7 +31,7 @@ class DiskCachingFileLoaderCache; class DiskCachingFileLoader : public ProxiedFileLoader { public: DiskCachingFileLoader(FileLoader *backend); - ~DiskCachingFileLoader() override; + ~DiskCachingFileLoader(); bool Exists() override; bool ExistsFast() override; diff --git a/Core/FileLoaders/HTTPFileLoader.h b/Core/FileLoaders/HTTPFileLoader.h index 84a4361097..ec92b8b9d5 100644 --- a/Core/FileLoaders/HTTPFileLoader.h +++ b/Core/FileLoaders/HTTPFileLoader.h @@ -30,21 +30,21 @@ class HTTPFileLoader : public FileLoader { public: HTTPFileLoader(const ::Path &filename); - virtual ~HTTPFileLoader() override; + ~HTTPFileLoader(); bool IsRemote() override { return true; } - virtual bool Exists() override; - virtual bool ExistsFast() override; - virtual bool IsDirectory() override; - virtual s64 FileSize() override; - virtual Path GetPath() const override; + bool Exists() override; + bool ExistsFast() override; + bool IsDirectory() override; + s64 FileSize() override; + Path GetPath() const override; - virtual size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override { + size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override { return ReadAt(absolutePos, bytes * count, data, flags) / bytes; } - virtual size_t ReadAt(s64 absolutePos, size_t bytes, void *data, Flags flags = Flags::NONE) override; + size_t ReadAt(s64 absolutePos, size_t bytes, void *data, Flags flags = Flags::NONE) override; void Cancel() override { cancel_ = true; diff --git a/Core/FileLoaders/LocalFileLoader.h b/Core/FileLoaders/LocalFileLoader.h index 9e1f37c10f..8db0b24b02 100644 --- a/Core/FileLoaders/LocalFileLoader.h +++ b/Core/FileLoaders/LocalFileLoader.h @@ -30,15 +30,15 @@ typedef void *HANDLE; class LocalFileLoader : public FileLoader { public: LocalFileLoader(const Path &filename); - virtual ~LocalFileLoader(); + ~LocalFileLoader(); - virtual bool Exists() override; - virtual bool IsDirectory() override; - virtual s64 FileSize() override; - virtual Path GetPath() const override { + bool Exists() override; + bool IsDirectory() override; + s64 FileSize() override; + Path GetPath() const override { return filename_; } - virtual size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override; + size_t ReadAt(s64 absolutePos, size_t bytes, size_t count, void *data, Flags flags = Flags::NONE) override; private: #ifndef _WIN32 diff --git a/Core/FileLoaders/RamCachingFileLoader.h b/Core/FileLoaders/RamCachingFileLoader.h index 44c375d442..dde5e74ecb 100644 --- a/Core/FileLoaders/RamCachingFileLoader.h +++ b/Core/FileLoaders/RamCachingFileLoader.h @@ -27,7 +27,7 @@ class RamCachingFileLoader : public ProxiedFileLoader { public: RamCachingFileLoader(FileLoader *backend); - ~RamCachingFileLoader() override; + ~RamCachingFileLoader(); bool Exists() override; bool ExistsFast() override; diff --git a/Core/FileSystems/FileSystem.h b/Core/FileSystems/FileSystem.h index 350b97cd8f..d2eeca6651 100644 --- a/Core/FileSystems/FileSystem.h +++ b/Core/FileSystems/FileSystem.h @@ -77,7 +77,7 @@ public: class SequentialHandleAllocator : public IHandleAllocator { public: SequentialHandleAllocator() : handle_(1) {} - virtual u32 GetNewHandle() override { + u32 GetNewHandle() override { u32 res = handle_++; if (handle_ < 0) { // Some code assumes it'll never become 0. @@ -85,7 +85,7 @@ public: } return res; } - virtual void FreeHandle(u32 handle) override {} + void FreeHandle(u32 handle) override {} private: int handle_; }; @@ -142,7 +142,7 @@ public: class EmptyFileSystem : public IFileSystem { public: - virtual void DoState(PointerWrap &p) override {} + void DoState(PointerWrap &p) override {} std::vector GetDirListing(const std::string &path, bool *exists = nullptr) override { if (exists) *exists = false; @@ -158,14 +158,14 @@ public: size_t SeekFile(u32 handle, s32 position, FileMove type) override {return 0;} PSPFileInfo GetFileInfo(std::string filename) override {PSPFileInfo f; return f;} bool OwnsHandle(u32 handle) override {return false;} - virtual bool MkDir(const std::string &dirname) override {return false;} - virtual bool RmDir(const std::string &dirname) override {return false;} - virtual int RenameFile(const std::string &from, const std::string &to) override {return -1;} - virtual bool RemoveFile(const std::string &filename) override {return false;} - virtual int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override {return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; } - virtual PSPDevType DevType(u32 handle) override { return PSPDevType::INVALID; } - virtual FileSystemFlags Flags() override { return FileSystemFlags::NONE; } - virtual u64 FreeSpace(const std::string &path) override { return 0; } + bool MkDir(const std::string &dirname) override {return false;} + bool RmDir(const std::string &dirname) override {return false;} + int RenameFile(const std::string &from, const std::string &to) override {return -1;} + bool RemoveFile(const std::string &filename) override {return false;} + int Ioctl(u32 handle, u32 cmd, u32 indataPtr, u32 inlen, u32 outdataPtr, u32 outlen, int &usec) override { return SCE_KERNEL_ERROR_ERRNO_FUNCTION_NOT_SUPPORTED; } + PSPDevType DevType(u32 handle) override { return PSPDevType::INVALID; } + FileSystemFlags Flags() override { return FileSystemFlags::NONE; } + u64 FreeSpace(const std::string &path) override { return 0; } bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override { return false; } }; diff --git a/Core/Loaders.h b/Core/Loaders.h index fa6c637d9e..2bef2858f5 100644 --- a/Core/Loaders.h +++ b/Core/Loaders.h @@ -94,7 +94,7 @@ public: class ProxiedFileLoader : public FileLoader { public: ProxiedFileLoader(FileLoader *backend) : backend_(backend) {} - ~ProxiedFileLoader() override { + ~ProxiedFileLoader() { // Takes ownership. delete backend_; } diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index e5aadba24b..973ddf524e 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -136,7 +136,7 @@ private: class IRJit : public JitInterface { public: IRJit(MIPSState *mipsState); - virtual ~IRJit(); + ~IRJit(); void DoState(PointerWrap &p) override; diff --git a/Core/MIPS/x86/IRToX86.h b/Core/MIPS/x86/IRToX86.h index d1555f6405..31a2cc3297 100644 --- a/Core/MIPS/x86/IRToX86.h +++ b/Core/MIPS/x86/IRToX86.h @@ -14,7 +14,7 @@ public: class IRToX86 : public IRToNativeInterface { public: void SetCodeBlock(Gen::XCodeBlock *code) { code_ = code; } - virtual void ConvertIRToNative(const IRInst *instructions, int count, const u32 *constants) override; + void ConvertIRToNative(const IRInst *instructions, int count, const u32 *constants) override; private: Gen::XCodeBlock *code_; diff --git a/Core/MIPS/x86/Jit.h b/Core/MIPS/x86/Jit.h index 0c96188ee4..8427f837ec 100644 --- a/Core/MIPS/x86/Jit.h +++ b/Core/MIPS/x86/Jit.h @@ -44,7 +44,7 @@ struct RegCacheState { class Jit : public Gen::XCodeBlock, public JitInterface, public MIPSFrontendInterface { public: Jit(MIPSState *mipsState); - virtual ~Jit(); + ~Jit(); const JitOptions &GetJitOptions() { return jo; } diff --git a/Core/Screenshot.cpp b/Core/Screenshot.cpp index 00f7d0a305..6ad9de9316 100644 --- a/Core/Screenshot.cpp +++ b/Core/Screenshot.cpp @@ -41,7 +41,7 @@ public: JPEGFileStream(const Path &filename) { fp_ = File::OpenCFile(filename, "wb"); } - ~JPEGFileStream() override { + ~JPEGFileStream() { if (fp_ ) { fclose(fp_); } diff --git a/Core/ThreadEventQueue.h b/Core/ThreadEventQueue.h index d365454776..161e06753c 100644 --- a/Core/ThreadEventQueue.h +++ b/Core/ThreadEventQueue.h @@ -28,6 +28,8 @@ template ActiveDisplayLists() = 0; virtual void ResetListPC(int listID, u32 pc) = 0; diff --git a/GPU/Common/SplineCommon.h b/GPU/Common/SplineCommon.h index 3b63732c87..f1a834b265 100644 --- a/GPU/Common/SplineCommon.h +++ b/GPU/Common/SplineCommon.h @@ -63,7 +63,7 @@ struct SurfaceInfo { GEPatchPrimType primType; bool patchFacing; - void Init() { + void BaseInit() { // If specified as 0, uses 1. if (tess_u < 1) tess_u = 1; if (tess_v < 1) tess_v = 1; @@ -88,7 +88,7 @@ struct BezierSurface : public SurfaceInfo { int num_verts_per_patch; void Init(int maxVertices) { - SurfaceInfo::Init(); + SurfaceInfo::BaseInit(); // Downsample until it fits, in case crazy tessellation factors are sent. while ((tess_u + 1) * (tess_v + 1) * num_patches_u * num_patches_v > maxVertices) { tess_u--; @@ -126,7 +126,7 @@ struct SplineSurface : public SurfaceInfo { int num_vertices_u; void Init(int maxVertices) { - SurfaceInfo::Init(); + SurfaceInfo::BaseInit(); // Downsample until it fits, in case crazy tessellation factors are sent. while ((num_patches_u * tess_u + 1) * (num_patches_v * tess_v + 1) > maxVertices) { tess_u--; diff --git a/GPU/D3D11/DrawEngineD3D11.h b/GPU/D3D11/DrawEngineD3D11.h index 468c8cd3bb..2703828516 100644 --- a/GPU/D3D11/DrawEngineD3D11.h +++ b/GPU/D3D11/DrawEngineD3D11.h @@ -117,7 +117,7 @@ public: class DrawEngineD3D11 : public DrawEngineCommon { public: DrawEngineD3D11(Draw::DrawContext *draw, ID3D11Device *device, ID3D11DeviceContext *context); - virtual ~DrawEngineD3D11(); + ~DrawEngineD3D11(); void SetShaderManager(ShaderManagerD3D11 *shaderManager) { shaderManager_ = shaderManager; diff --git a/GPU/D3D11/GPU_D3D11.h b/GPU/D3D11/GPU_D3D11.h index a4bcbd670f..0fece6f431 100644 --- a/GPU/D3D11/GPU_D3D11.h +++ b/GPU/D3D11/GPU_D3D11.h @@ -54,9 +54,6 @@ protected: void FinishDeferred() override; private: - void Flush() { - drawEngine_.Flush(); - } // void ApplyDrawState(int prim); void CheckFlushOp(int cmd, u32 diff); void BuildReportingInfo() override; diff --git a/GPU/Directx9/DrawEngineDX9.h b/GPU/Directx9/DrawEngineDX9.h index 3bc7222a67..e8bb1fbf42 100644 --- a/GPU/Directx9/DrawEngineDX9.h +++ b/GPU/Directx9/DrawEngineDX9.h @@ -105,7 +105,7 @@ public: class DrawEngineDX9 : public DrawEngineCommon { public: DrawEngineDX9(Draw::DrawContext *draw); - virtual ~DrawEngineDX9(); + ~DrawEngineDX9(); void SetShaderManager(ShaderManagerDX9 *shaderManager) { shaderManager_ = shaderManager; diff --git a/GPU/Directx9/GPU_DX9.h b/GPU/Directx9/GPU_DX9.h index 058e1b75d2..621ad79857 100644 --- a/GPU/Directx9/GPU_DX9.h +++ b/GPU/Directx9/GPU_DX9.h @@ -54,9 +54,6 @@ protected: void FinishDeferred() override; private: - void Flush() { - drawEngine_.Flush(); - } void CheckFlushOp(int cmd, u32 diff); void BuildReportingInfo() override; diff --git a/GPU/GLES/DrawEngineGLES.cpp b/GPU/GLES/DrawEngineGLES.cpp index 2907929f12..ebdf4051b4 100644 --- a/GPU/GLES/DrawEngineGLES.cpp +++ b/GPU/GLES/DrawEngineGLES.cpp @@ -487,10 +487,6 @@ void DrawEngineGLES::DoFlush() { GPUDebug::NotifyDraw(); } -bool DrawEngineGLES::IsCodePtrVertexDecoder(const u8 *ptr) const { - return decJitCache_->IsInSpace(ptr); -} - // TODO: Refactor this to a single USE flag. bool DrawEngineGLES::SupportsHWTessellation() const { bool hasTexelFetch = gl_extensions.GLES3 || (!gl_extensions.IsGLES && gl_extensions.VersionGEThan(3, 3, 0)) || gl_extensions.EXT_gpu_shader4; diff --git a/GPU/GLES/DrawEngineGLES.h b/GPU/GLES/DrawEngineGLES.h index a1a8adce97..9352291c29 100644 --- a/GPU/GLES/DrawEngineGLES.h +++ b/GPU/GLES/DrawEngineGLES.h @@ -61,7 +61,7 @@ public: class DrawEngineGLES : public DrawEngineCommon { public: DrawEngineGLES(Draw::DrawContext *draw); - virtual ~DrawEngineGLES(); + ~DrawEngineGLES(); void SetShaderManager(ShaderManagerGLES *shaderManager) { shaderManager_ = shaderManager; @@ -97,8 +97,6 @@ public: DoFlush(); } - bool IsCodePtrVertexDecoder(const u8 *ptr) const; - void DispatchFlush() override { Flush(); } GLPushBuffer *GetPushVertexBuffer() { diff --git a/GPU/GLES/GPU_GLES.h b/GPU/GLES/GPU_GLES.h index afb1de0f42..ce2b363149 100644 --- a/GPU/GLES/GPU_GLES.h +++ b/GPU/GLES/GPU_GLES.h @@ -65,9 +65,6 @@ protected: void FinishDeferred() override; private: - void Flush() { - drawEngine_.Flush(); - } void CheckFlushOp(int cmd, u32 diff); void BuildReportingInfo() override; diff --git a/GPU/GPUCommon.h b/GPU/GPUCommon.h index c15afe508f..26442c09bd 100644 --- a/GPU/GPUCommon.h +++ b/GPU/GPUCommon.h @@ -71,7 +71,7 @@ struct TransformedVertex { class GPUCommon : public GPUInterface, public GPUDebugInterface { public: GPUCommon(GraphicsContext *gfxCtx, Draw::DrawContext *draw); - virtual ~GPUCommon(); + ~GPUCommon(); Draw::DrawContext *GetDrawContext() override { return draw_; diff --git a/GPU/Vulkan/DrawEngineVulkan.h b/GPU/Vulkan/DrawEngineVulkan.h index 239be55390..afc61a25f4 100644 --- a/GPU/Vulkan/DrawEngineVulkan.h +++ b/GPU/Vulkan/DrawEngineVulkan.h @@ -140,7 +140,7 @@ enum { class DrawEngineVulkan : public DrawEngineCommon { public: DrawEngineVulkan(Draw::DrawContext *draw); - virtual ~DrawEngineVulkan(); + ~DrawEngineVulkan(); // We reference feature flags, so this is called after construction. void InitDeviceObjects(); diff --git a/GPU/Vulkan/GPU_Vulkan.h b/GPU/Vulkan/GPU_Vulkan.h index 8c970948bd..eefaa23b3c 100644 --- a/GPU/Vulkan/GPU_Vulkan.h +++ b/GPU/Vulkan/GPU_Vulkan.h @@ -71,9 +71,6 @@ protected: void CheckRenderResized() override; private: - void Flush() { - drawEngine_.Flush(); - } void CheckFlushOp(int cmd, u32 diff); void BuildReportingInfo() override; void InitClear() override; diff --git a/GPU/Vulkan/TextureCacheVulkan.cpp b/GPU/Vulkan/TextureCacheVulkan.cpp index a39d7e71b0..3205453c21 100644 --- a/GPU/Vulkan/TextureCacheVulkan.cpp +++ b/GPU/Vulkan/TextureCacheVulkan.cpp @@ -588,7 +588,7 @@ void TextureCacheVulkan::BuildTexture(TexCacheEntry *const entry) { } else { data = drawEngine_->GetPushBufferForTextureData()->PushAligned(sz, &bufferOffset, &texBuf, pushAlignment); } - LoadTextureLevel(*entry, (uint8_t *)data, lstride, srcLevel, lfactor, actualFmt); + LoadVulkanTextureLevel(*entry, (uint8_t *)data, lstride, srcLevel, lfactor, actualFmt); if (plan.saveTexture) bufferOffset = drawEngine_->GetPushBufferForTextureData()->PushAligned(&saveData[0], sz, pushAlignment, &texBuf); }; @@ -706,7 +706,7 @@ VkFormat TextureCacheVulkan::GetDestFormat(GETextureFormat format, GEPaletteForm } } -void TextureCacheVulkan::LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) { +void TextureCacheVulkan::LoadVulkanTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt) { int w = gstate.getTextureWidth(level); int h = gstate.getTextureHeight(level); diff --git a/GPU/Vulkan/TextureCacheVulkan.h b/GPU/Vulkan/TextureCacheVulkan.h index f83595dc46..2c16d02a03 100644 --- a/GPU/Vulkan/TextureCacheVulkan.h +++ b/GPU/Vulkan/TextureCacheVulkan.h @@ -100,7 +100,7 @@ protected: void *GetNativeTextureView(const TexCacheEntry *entry) override; private: - void LoadTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt); + void LoadVulkanTextureLevel(TexCacheEntry &entry, uint8_t *writePtr, int rowPitch, int level, int scaleFactor, VkFormat dstFmt); VkFormat GetDestFormat(GETextureFormat format, GEPaletteFormat clutFormat) const; void UpdateCurrentClut(GEPaletteFormat clutFormat, u32 clutBase, bool clutIndexIsSimple) override; diff --git a/Qt/QtHost.h b/Qt/QtHost.h index 79a65caa68..d8fa12f1f7 100644 --- a/Qt/QtHost.h +++ b/Qt/QtHost.h @@ -30,45 +30,45 @@ public: mainWindow = mainWindow_; } - virtual void UpdateUI() override { + void UpdateUI() override { mainWindow->updateMenus(); } - virtual void UpdateMemView() override { + void UpdateMemView() override { } - virtual void UpdateDisassembly() override { + void UpdateDisassembly() override { mainWindow->updateMenus(); } - virtual void SetDebugMode(bool mode) override { + void SetDebugMode(bool mode) override { } - virtual bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override { return true; } - virtual void ShutdownGraphics() override {} + bool InitGraphics(std::string *error_message, GraphicsContext **ctx) override { return true; } + void ShutdownGraphics() override {} - virtual void InitSound() override; - virtual void UpdateSound() override {} - virtual void ShutdownSound() override; + void InitSound() override; + void UpdateSound() override {} + void ShutdownSound() override; // this is sent from EMU thread! Make sure that Host handles it properly! - virtual void BootDone() override { + void BootDone() override { g_symbolMap->SortSymbols(); mainWindow->Notify(MainWindowMsg::BOOT_DONE); } - virtual bool IsDebuggingEnabled() override { + bool IsDebuggingEnabled() override { #ifdef _DEBUG return true; #else return false; #endif } - virtual bool AttemptLoadSymbolMap() override { + bool AttemptLoadSymbolMap() override { auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart); return g_symbolMap->LoadSymbolMap(fn); } - virtual void NotifySymbolMapUpdated() override { g_symbolMap->SortSymbols(); } + void NotifySymbolMapUpdated() override { g_symbolMap->SortSymbols(); } void PrepareShutdown() { auto fn = SymbolMapFilename(PSP_CoreParameter().fileToStart); diff --git a/UI/DisplayLayoutScreen.cpp b/UI/DisplayLayoutScreen.cpp index b1612c3c2f..380208d42c 100644 --- a/UI/DisplayLayoutScreen.cpp +++ b/UI/DisplayLayoutScreen.cpp @@ -61,7 +61,7 @@ class DisplayLayoutBackground : public UI::View { public: DisplayLayoutBackground(UI::ChoiceStrip *mode, UI::LayoutParams *layoutParams) : UI::View(layoutParams), mode_(mode) {} - bool Touch(const TouchInput &touch) { + bool Touch(const TouchInput &touch) override { int mode = mode_ ? mode_->GetSelection() : 0; if ((touch.flags & TOUCH_MOVE) != 0 && dragging_) { diff --git a/UI/GameInfoCache.cpp b/UI/GameInfoCache.cpp index b6f0a7cfb7..16efa42e90 100644 --- a/UI/GameInfoCache.cpp +++ b/UI/GameInfoCache.cpp @@ -334,7 +334,7 @@ public: : gamePath_(gamePath), info_(info) { } - ~GameInfoWorkItem() override { + ~GameInfoWorkItem() { info_->pending.store(false); info_->working.store(false); info_->DisposeFileLoader(); diff --git a/UI/InstallZipScreen.h b/UI/InstallZipScreen.h index 140b82fec2..b877595d57 100644 --- a/UI/InstallZipScreen.h +++ b/UI/InstallZipScreen.h @@ -27,13 +27,13 @@ class InstallZipScreen : public UIDialogScreenWithBackground { public: InstallZipScreen(const Path &zipPath); - virtual void update() override; - virtual bool key(const KeyInput &key) override; + void update() override; + bool key(const KeyInput &key) override; const char *tag() const override { return "InstallZip"; } protected: - virtual void CreateViews() override; + void CreateViews() override; private: UI::EventReturn OnInstall(UI::EventParams ¶ms); diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 0855e7eea6..5a03804908 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -434,7 +434,7 @@ public: DirButton(const Path &path, const std::string &text, bool gridStyle, UI::LayoutParams *layoutParams = 0) : UI::Button(text, layoutParams), path_(path), gridStyle_(gridStyle), absolute_(true) {} - virtual void Draw(UIContext &dc); + void Draw(UIContext &dc) override; const Path &GetPath() const { return path_; @@ -1490,7 +1490,7 @@ void UmdReplaceScreen::CreateViews() { tabAllGames->OnHoldChoice.Handle(this, &UmdReplaceScreen::OnGameSelected); - rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle(this, &UmdReplaceScreen::OnCancel); + rightColumnItems->Add(new Choice(di->T("Cancel")))->OnClick.Handle(this, &UIScreen::OnCancel); rightColumnItems->Add(new Choice(mm->T("Game Settings")))->OnClick.Handle(this, &UmdReplaceScreen::OnGameSettings); if (g_Config.HasRecentIsos()) { @@ -1515,11 +1515,6 @@ UI::EventReturn UmdReplaceScreen::OnGameSelected(UI::EventParams &e) { return UI::EVENT_DONE; } -UI::EventReturn UmdReplaceScreen::OnCancel(UI::EventParams &e) { - TriggerFinish(DR_CANCEL); - return UI::EVENT_DONE; -} - UI::EventReturn UmdReplaceScreen::OnGameSettings(UI::EventParams &e) { screenManager()->push(new GameSettingsScreen(Path())); return UI::EVENT_DONE; diff --git a/UI/MainScreen.h b/UI/MainScreen.h index 995a912a92..ee79725fd1 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -165,7 +165,6 @@ private: UI::EventReturn OnGameSelected(UI::EventParams &e); UI::EventReturn OnGameSelectedInstant(UI::EventParams &e); - UI::EventReturn OnCancel(UI::EventParams &e); UI::EventReturn OnGameSettings(UI::EventParams &e); }; diff --git a/UI/MiscScreens.cpp b/UI/MiscScreens.cpp index f880935e08..4bcfb1cb83 100644 --- a/UI/MiscScreens.cpp +++ b/UI/MiscScreens.cpp @@ -157,7 +157,6 @@ public: class FloatingSymbolsAnimation : public Animation { public: - ~FloatingSymbolsAnimation() override {} void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override { float xres = dc.GetBounds().w; float yres = dc.GetBounds().h; @@ -196,7 +195,6 @@ private: class RecentGamesAnimation : public Animation { public: - ~RecentGamesAnimation() override {} void Draw(UIContext &dc, double t, float alpha, float x, float y, float z) override { if (lastIndex_ == nextIndex_) { CheckNext(dc, t); @@ -812,7 +810,7 @@ void CreditsScreen::CreateViews() { root_ = new AnchorLayout(new LayoutParams(FILL_PARENT, FILL_PARENT)); Button *back = root_->Add(new Button(di->T("Back"), new AnchorLayoutParams(260, 64, NONE, NONE, 10, 10, false))); - back->OnClick.Handle(this, &CreditsScreen::OnOK); + back->OnClick.Handle(this, &UIScreen::OnOK); root_->SetDefaultFocusView(back); // Really need to redo this whole layout with some linear layouts... @@ -881,11 +879,6 @@ UI::EventReturn CreditsScreen::OnShare(UI::EventParams &e) { return UI::EVENT_DONE; } -UI::EventReturn CreditsScreen::OnOK(UI::EventParams &e) { - TriggerFinish(DR_OK); - return UI::EVENT_DONE; -} - CreditsScreen::CreditsScreen() { startTime_ = time_now_d(); } diff --git a/UI/MiscScreens.h b/UI/MiscScreens.h index d218739a78..32fe101973 100644 --- a/UI/MiscScreens.h +++ b/UI/MiscScreens.h @@ -161,8 +161,6 @@ public: const char *tag() const override { return "Credits"; } private: - UI::EventReturn OnOK(UI::EventParams &e); - UI::EventReturn OnSupport(UI::EventParams &e); UI::EventReturn OnPPSSPPOrg(UI::EventParams &e); UI::EventReturn OnPrivacy(UI::EventParams &e); @@ -183,7 +181,7 @@ public: } void Show(const std::string &text, UI::View *refView = nullptr); - void Draw(UIContext &dc); + void Draw(UIContext &dc) override; std::string GetText() const; private: diff --git a/UI/PauseScreen.h b/UI/PauseScreen.h index 1d54db7916..f9f0a949ab 100644 --- a/UI/PauseScreen.h +++ b/UI/PauseScreen.h @@ -33,7 +33,7 @@ enum class PauseScreenMode { class GamePauseScreen : public UIDialogScreenWithGameBackground { public: GamePauseScreen(const Path &filename) : UIDialogScreenWithGameBackground(filename), gamePath_(filename) {} - virtual ~GamePauseScreen(); + ~GamePauseScreen(); void dialogFinished(const Screen *dialog, DialogResult dr) override; diff --git a/UI/RemoteISOScreen.h b/UI/RemoteISOScreen.h index b8676e4832..53bc2706ed 100644 --- a/UI/RemoteISOScreen.h +++ b/UI/RemoteISOScreen.h @@ -57,7 +57,7 @@ enum class ScanStatus { class RemoteISOConnectScreen : public UIScreenWithBackground { public: RemoteISOConnectScreen(); - ~RemoteISOConnectScreen() override; + ~RemoteISOConnectScreen(); const char *tag() const override { return "RemoteISOConnect"; } diff --git a/UI/ReportScreen.cpp b/UI/ReportScreen.cpp index ca09054c28..c192a021a5 100644 --- a/UI/ReportScreen.cpp +++ b/UI/ReportScreen.cpp @@ -43,7 +43,7 @@ class RatingChoice : public LinearLayout { public: RatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0); - RatingChoice *SetEnabledPtr(bool *enabled); + RatingChoice *SetEnabledPtrs(bool *enabled); Event OnChoice; @@ -94,7 +94,7 @@ void RatingChoice::Update() { } } -RatingChoice *RatingChoice::SetEnabledPtr(bool *ptr) { +RatingChoice *RatingChoice::SetEnabledPtrs(bool *ptr) { for (int i = 0; i < TotalChoices(); i++) { GetChoice(i)->SetEnabledPtr(ptr); } @@ -139,8 +139,8 @@ public: CompatRatingChoice(const char *captionKey, int *value, LayoutParams *layoutParams = 0); protected: - virtual void SetupChoices() override; - virtual int TotalChoices() override { + void SetupChoices() override; + int TotalChoices() override { return 5; } }; @@ -295,16 +295,16 @@ void ReportScreen::CreateViews() { screenshot_ = nullptr; } - leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtr(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); + leftColumnItems->Add(new CompatRatingChoice("Overall", (int *)&overall_))->SetEnabledPtrs(&enableReporting_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); overallDescription_ = leftColumnItems->Add(new TextView("", FLAG_WRAP_TEXT, false, new LinearLayoutParams(Margins(10, 0)))); overallDescription_->SetShadow(true); UI::Orientation ratingsOrient = leftColumnWidth >= 750.0f ? ORIENT_HORIZONTAL : ORIENT_VERTICAL; UI::LinearLayout *ratingsHolder = new LinearLayoutList(ratingsOrient, new LinearLayoutParams(WRAP_CONTENT, WRAP_CONTENT)); leftColumnItems->Add(ratingsHolder); - ratingsHolder->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); - ratingsHolder->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); - ratingsHolder->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtr(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); + ratingsHolder->Add(new RatingChoice("Graphics", &graphics_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); + ratingsHolder->Add(new RatingChoice("Speed", &speed_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); + ratingsHolder->Add(new RatingChoice("Gameplay", &gameplay_))->SetEnabledPtrs(&ratingEnabled_)->OnChoice.Handle(this, &ReportScreen::HandleChoice); rightColumnItems->SetSpacing(0.0f); rightColumnItems->Add(new Choice(rp->T("Open Browser")))->OnClick.Handle(this, &ReportScreen::HandleBrowser); diff --git a/UI/TouchControlLayoutScreen.h b/UI/TouchControlLayoutScreen.h index 0c3f328f96..43c5762f4f 100644 --- a/UI/TouchControlLayoutScreen.h +++ b/UI/TouchControlLayoutScreen.h @@ -27,18 +27,18 @@ class TouchControlLayoutScreen : public UIDialogScreenWithGameBackground { public: TouchControlLayoutScreen(const Path &gamePath) : UIDialogScreenWithGameBackground(gamePath) {} - virtual void CreateViews() override; - virtual void dialogFinished(const Screen *dialog, DialogResult result) override; - virtual void onFinish(DialogResult reason) override; - virtual void update() override; - virtual void resized() override; + void CreateViews() override; + void dialogFinished(const Screen *dialog, DialogResult result) override; + void onFinish(DialogResult reason) override; + void update() override; + void resized() override; const char *tag() const override { return "TouchControlLayout"; } protected: - virtual UI::EventReturn OnReset(UI::EventParams &e); - virtual UI::EventReturn OnVisibility(UI::EventParams &e); - virtual UI::EventReturn OnMode(UI::EventParams &e); + UI::EventReturn OnReset(UI::EventParams &e); + UI::EventReturn OnVisibility(UI::EventParams &e); + UI::EventReturn OnMode(UI::EventParams &e); private: UI::ChoiceStrip *mode_ = nullptr; diff --git a/Windows/CaptureDevice.h b/Windows/CaptureDevice.h index d457702afe..d0ed3b4b5f 100644 --- a/Windows/CaptureDevice.h +++ b/Windows/CaptureDevice.h @@ -116,12 +116,12 @@ class WindowsCaptureDevice; class ReaderCallback final : public IMFSourceReaderCallback { public: ReaderCallback(WindowsCaptureDevice *device); - ~ReaderCallback(); + virtual ~ReaderCallback(); // IUnknown methods. - STDMETHODIMP QueryInterface(REFIID iid, void** ppv); - STDMETHODIMP_(ULONG) AddRef() { return 0; } // Unused, just define. - STDMETHODIMP_(ULONG) Release() { return 0; } // Unused, just define. + STDMETHODIMP QueryInterface(REFIID iid, void** ppv) override; + STDMETHODIMP_(ULONG) AddRef() override { return 0; } // Unused, just define. + STDMETHODIMP_(ULONG) Release() override { return 0; } // Unused, just define. // IMFSourceReaderCallback methods. STDMETHODIMP OnReadSample( @@ -130,10 +130,10 @@ public: DWORD dwStreamFlags, LONGLONG llTimestamp, IMFSample *pSample // Can be null,even if hrStatus is success. - ); + ) override; - STDMETHODIMP OnEvent(DWORD, IMFMediaEvent *) { return S_OK; } - STDMETHODIMP OnFlush(DWORD) { return S_OK; } + STDMETHODIMP OnEvent(DWORD, IMFMediaEvent *) override { return S_OK; } + STDMETHODIMP OnFlush(DWORD) override { return S_OK; } AVPixelFormat getAVVideoFormatbyMFVideoFormat(const GUID &MFVideoFormat); AVSampleFormat getAVAudioFormatbyMFAudioFormat(const GUID &MFAudioFormat, const u32 &bitsPerSample); diff --git a/Windows/DSoundStream.h b/Windows/DSoundStream.h index 7b4798449a..b3ebe194ab 100644 --- a/Windows/DSoundStream.h +++ b/Windows/DSoundStream.h @@ -11,7 +11,7 @@ struct IDirectSoundBuffer; class DSoundAudioBackend : public WindowsAudioBackend { public: DSoundAudioBackend(); - ~DSoundAudioBackend() override; + ~DSoundAudioBackend(); bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object void Update() override; diff --git a/Windows/Debugger/Debugger_Lists.h b/Windows/Debugger/Debugger_Lists.h index 43dd834a44..b553de5f7b 100644 --- a/Windows/Debugger/Debugger_Lists.h +++ b/Windows/Debugger/Debugger_Lists.h @@ -15,11 +15,11 @@ public: void showMenu(int itemIndex, const POINT &pt); const char* getCurrentThreadName(); protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); - virtual void GetColumnText(wchar_t* dest, int row, int col); - virtual int GetRowCount() { return (int) threads.size(); }; - virtual void OnDoubleClick(int itemIndex, int column); - virtual void OnRightClick(int itemIndex, int column, const POINT& point); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override; + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override { return (int) threads.size(); } + void OnDoubleClick(int itemIndex, int column) override; + void OnRightClick(int itemIndex, int column, const POINT &point) override; private: std::vector threads; }; @@ -31,14 +31,13 @@ class CtrlBreakpointList: public GenericListControl public: CtrlBreakpointList(HWND hwnd, DebugInterface* cpu, CtrlDisAsmView* disasm); void reloadBreakpoints(); - void showMenu(int itemIndex, const POINT &pt); protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); - virtual void GetColumnText(wchar_t* dest, int row, int col); - virtual int GetRowCount() { return getTotalBreakpointCount(); }; - virtual void OnDoubleClick(int itemIndex, int column); - virtual void OnRightClick(int itemIndex, int column, const POINT& point); - virtual void OnToggle(int item, bool newValue); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override; + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override { return getTotalBreakpointCount(); } + void OnDoubleClick(int itemIndex, int column) override; + void OnRightClick(int itemIndex, int column, const POINT &point) override; + void OnToggle(int item, bool newValue) override; private: std::vector displayedBreakPoints_; std::vector displayedMemChecks_; @@ -61,10 +60,10 @@ public: CtrlStackTraceView(HWND hwnd, DebugInterface* cpu, CtrlDisAsmView* disasm); void loadStackTrace(); protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); - virtual void GetColumnText(wchar_t* dest, int row, int col); - virtual int GetRowCount() { return (int)frames.size(); }; - virtual void OnDoubleClick(int itemIndex, int column); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override; + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override { return (int)frames.size(); } + void OnDoubleClick(int itemIndex, int column) override; private: std::vector frames; DebugInterface* cpu; @@ -77,11 +76,11 @@ public: CtrlModuleList(HWND hwnd, DebugInterface* cpu); void loadModules(); protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); - virtual void GetColumnText(wchar_t* dest, int row, int col); - virtual int GetRowCount() { return (int)modules.size(); }; - virtual void OnDoubleClick(int itemIndex, int column); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override; + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override { return (int)modules.size(); } + void OnDoubleClick(int itemIndex, int column) override; private: std::vector modules; DebugInterface* cpu; -}; \ No newline at end of file +}; diff --git a/Windows/Debugger/Debugger_MemoryDlg.h b/Windows/Debugger/Debugger_MemoryDlg.h index b02d72d0d9..4e47d37be1 100644 --- a/Windows/Debugger/Debugger_MemoryDlg.h +++ b/Windows/Debugger/Debugger_MemoryDlg.h @@ -19,7 +19,7 @@ private: HWND memViewHdl, symListHdl, editWnd, searchBoxHdl, srcListHdl; HWND layerDropdown_; HWND status_; - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; public: int index; //helper @@ -33,11 +33,9 @@ public: ~CMemoryDlg(void); void Goto(u32 addr); - void Update(void); + void Update(void) override; void NotifyMapLoaded(); - void NotifySearchCompleted(); - void Size(void); private: diff --git a/Windows/Debugger/Debugger_VFPUDlg.h b/Windows/Debugger/Debugger_VFPUDlg.h index 0e5763dcfc..080957a7a9 100644 --- a/Windows/Debugger/Debugger_VFPUDlg.h +++ b/Windows/Debugger/Debugger_VFPUDlg.h @@ -10,7 +10,7 @@ public: ~CVFPUDlg(); void Goto(u32 addr); - void Update(); + void Update() override; void Size(); private: @@ -18,5 +18,5 @@ private: DebugInterface *cpu; HFONT font; int mode; - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; }; diff --git a/Windows/DinputDevice.h b/Windows/DinputDevice.h index d8ecc8762f..5dc2474e2a 100644 --- a/Windows/DinputDevice.h +++ b/Windows/DinputDevice.h @@ -32,7 +32,7 @@ public: //getDevices(), enumerates all devices if not done yet DinputDevice(int devnum); ~DinputDevice(); - virtual int UpdateState() override; + int UpdateState() override; static size_t getNumPads(); static void CheckDevices() { needsCheck_ = true; diff --git a/Windows/GEDebugger/GEDebugger.h b/Windows/GEDebugger/GEDebugger.h index 24e7ffd280..56f1d24746 100644 --- a/Windows/GEDebugger/GEDebugger.h +++ b/Windows/GEDebugger/GEDebugger.h @@ -81,7 +81,7 @@ public: StepCountDlg(HINSTANCE _hInstance, HWND _hParent); ~StepCountDlg(); protected: - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; private: void Jump(int count, bool relative); }; @@ -94,7 +94,7 @@ public: static void Init(); protected: - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; private: void SetupPreviews(); diff --git a/Windows/GEDebugger/TabDisplayLists.h b/Windows/GEDebugger/TabDisplayLists.h index ff4388225a..5e31a49341 100644 --- a/Windows/GEDebugger/TabDisplayLists.h +++ b/Windows/GEDebugger/TabDisplayLists.h @@ -12,12 +12,15 @@ class CtrlDisplayListStack: public GenericListControl { public: CtrlDisplayListStack(HWND hwnd); - void setDisplayList(DisplayList& _list) { list = _list; Update(); } + void setDisplayList(const DisplayList &_list) { + list = _list; + Update(); + } protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) { return false; }; - virtual void GetColumnText(wchar_t* dest, int row, int col); - virtual int GetRowCount() { return list.stackptr; }; - virtual void OnDoubleClick(int itemIndex, int column); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override { return false; } + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override { return list.stackptr; } + void OnDoubleClick(int itemIndex, int column) override; private: DisplayList list; }; @@ -26,12 +29,15 @@ class CtrlAllDisplayLists: public GenericListControl { public: CtrlAllDisplayLists(HWND hwnd); - void setDisplayLists(std::vector& _lists) { lists = _lists; Update(); }; + void setDisplayLists(const std::vector &_lists) { + lists = _lists; + Update(); + } protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue); - virtual void GetColumnText(wchar_t* dest, int row, int col); - virtual int GetRowCount() { return (int) lists.size(); }; - virtual void OnDoubleClick(int itemIndex, int column); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override; + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override { return (int) lists.size(); } + void OnDoubleClick(int itemIndex, int column) override; private: std::vector lists; }; @@ -43,7 +49,7 @@ public: ~TabDisplayLists(); void Update(bool reload = true); protected: - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; private: void UpdateSize(WORD width, WORD height); diff --git a/Windows/GEDebugger/TabState.h b/Windows/GEDebugger/TabState.h index 6992af14be..f525b02723 100644 --- a/Windows/GEDebugger/TabState.h +++ b/Windows/GEDebugger/TabState.h @@ -63,7 +63,7 @@ public: } protected: - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; CtrlStateValues *values; diff --git a/Windows/GEDebugger/TabVertices.h b/Windows/GEDebugger/TabVertices.h index 0a1f48be0c..4d7a04d660 100644 --- a/Windows/GEDebugger/TabVertices.h +++ b/Windows/GEDebugger/TabVertices.h @@ -35,9 +35,9 @@ public: } protected: - virtual bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT& returnValue) { return false; }; - virtual void GetColumnText(wchar_t *dest, int row, int col); - virtual int GetRowCount(); + bool WindowMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT &returnValue) override { return false; } + void GetColumnText(wchar_t *dest, int row, int col) override; + int GetRowCount() override; private: void FormatVertCol(wchar_t *dest, const GPUDebugVertex &vert, int col); @@ -57,12 +57,12 @@ public: TabVertices(HINSTANCE _hInstance, HWND _hParent); ~TabVertices(); - virtual void Update() { + void Update() override { values->Update(); } protected: - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; private: void UpdateSize(WORD width, WORD height); @@ -98,12 +98,12 @@ public: TabMatrices(HINSTANCE _hInstance, HWND _hParent); ~TabMatrices(); - virtual void Update() { + void Update() override { values->Update(); } protected: - BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam); + BOOL DlgProc(UINT message, WPARAM wParam, LPARAM lParam) override; private: void UpdateSize(WORD width, WORD height); diff --git a/Windows/WASAPIStream.cpp b/Windows/WASAPIStream.cpp index 3481e42d69..6079c030de 100644 --- a/Windows/WASAPIStream.cpp +++ b/Windows/WASAPIStream.cpp @@ -38,7 +38,7 @@ public: CMMNotificationClient() { } - ~CMMNotificationClient() { + virtual ~CMMNotificationClient() { CoTaskMemFree(currentDevice_); currentDevice_ = nullptr; SAFE_RELEASE(_pEnumerator) diff --git a/Windows/WASAPIStream.h b/Windows/WASAPIStream.h index b9e2169a78..9f0b88b40d 100644 --- a/Windows/WASAPIStream.h +++ b/Windows/WASAPIStream.h @@ -8,7 +8,7 @@ class WASAPIAudioBackend : public WindowsAudioBackend { public: WASAPIAudioBackend(); - ~WASAPIAudioBackend() override; + ~WASAPIAudioBackend(); bool Init(HWND window, StreamCallback callback, int sampleRate) override; // If fails, can safely delete the object void Update() override {} diff --git a/Windows/XinputDevice.h b/Windows/XinputDevice.h index bcff3e5db8..93347a6722 100644 --- a/Windows/XinputDevice.h +++ b/Windows/XinputDevice.h @@ -8,7 +8,7 @@ class XinputDevice final : public InputDevice { public: XinputDevice(); ~XinputDevice(); - virtual int UpdateState() override; + int UpdateState() override; private: void UpdatePad(int pad, const XINPUT_STATE &state, XINPUT_VIBRATION &vibration); diff --git a/headless/Compare.cpp b/headless/Compare.cpp index 9c42887342..e99b496b30 100644 --- a/headless/Compare.cpp +++ b/headless/Compare.cpp @@ -138,11 +138,11 @@ protected: BufferedLineReader() { } - virtual bool HasMoreLines() { + bool HasMoreLines() { return pos_ != data_.npos; } - virtual std::string ReadLine() { + std::string ReadLine() { size_t next = data_.find('\n', pos_); if (next == data_.npos) { std::string result = data_.substr(pos_); diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 98aefd31e7..fa63a489e1 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -65,7 +65,7 @@ bool audioRecording_State() { return false; } class PrintfLogger : public LogListener { public: - void Log(const LogMessage &message) { + void Log(const LogMessage &message) override { switch (message.level) { case LogTypes::LVERBOSE: fprintf(stderr, "V %s", message.msg.c_str()); diff --git a/unittest/TestThreadManager.cpp b/unittest/TestThreadManager.cpp index 1457c587ed..ece88ca494 100644 --- a/unittest/TestThreadManager.cpp +++ b/unittest/TestThreadManager.cpp @@ -74,8 +74,8 @@ class IncrementTask : public Task { public: IncrementTask(TaskType type, LimitedWaitable *waitable) : type_(type), waitable_(waitable) {} ~IncrementTask() {} - virtual TaskType Type() const { return type_; } - virtual void Run() { + TaskType Type() const override { return type_; } + void Run() override { g_atomicCounter++; waitable_->Notify(); }