Global: Cleanup virtual/override specifiers.

Also missing virtual destructors, hidden non-overrides, etc.
This commit is contained in:
Unknown W. Brackets 2022-12-10 20:32:12 -08:00
parent 31efd9565e
commit f44852bb18
83 changed files with 283 additions and 315 deletions

View File

@ -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) {

View File

@ -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);

View File

@ -7,6 +7,7 @@ public:
WordWrapper(const char *str, float maxW, int flags)
: str_(str), maxW_(maxW), flags_(flags) {
}
virtual ~WordWrapper() {}
std::string Wrapped();

View File

@ -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<File::FileInfo> *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<File::FileInfo> *listing, const char *filter) override;
bool GetFileInfo(const char *path, File::FileInfo *info) override;
std::string toString() const override {
return path_.ToString();
}

View File

@ -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();
}

View File

@ -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_);
}

View File

@ -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_;
}

View File

@ -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 {};

View File

@ -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

View File

@ -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;

View File

@ -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 + "\"";
}

View File

@ -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<std::string> *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<std::string> *items_;

View File

@ -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 &params);
EventReturn OnTextChange(EventParams &params);
EventReturn OnSliderChange(EventParams &params);
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 &params);
EventReturn OnTextChange(EventParams &params);
EventReturn OnSliderChange(EventParams &params);
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];
}

View File

@ -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<View *> &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<View *> &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 <class T>
@ -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<EventReturn(EventParams&)> callback);
View *CreateItemView(int index) override;
int GetNumItems() override { return numItems_; }
bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> callback) override;
private:
const char **items_;
@ -421,12 +417,12 @@ class StringVectorListAdaptor : public ListAdaptor {
public:
StringVectorListAdaptor() : selected_(-1) {}
StringVectorListAdaptor(const std::vector<std::string> &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<EventReturn(EventParams&)> callback) override;
View *CreateItemView(int index) override;
int GetNumItems() override { return (int)items_.size(); }
bool AddEventCallback(View *view, std::function<EventReturn(EventParams&)> 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<std::string> items_;
@ -440,7 +436,7 @@ public:
ListView(ListAdaptor *a, std::set<int> hidden = std::set<int>(), 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(); }

View File

@ -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;}

View File

@ -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; };

View File

@ -36,7 +36,7 @@ public:
WebSocketDisasmState() {
disasm_.setCpu(currentDebugMIPS);
}
~WebSocketDisasmState() override {
~WebSocketDisasmState() {
disasm_.clear();
}

View File

@ -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;

View File

@ -68,7 +68,7 @@ struct DebuggerGPUStatsEvent {
struct WebSocketGPUStatsState : public DebuggerSubscriber {
WebSocketGPUStatsState();
~WebSocketGPUStatsState() override;
~WebSocketGPUStatsState();
void Get(DebuggerRequest &req);
void Feed(DebuggerRequest &req);

View File

@ -27,7 +27,7 @@ class WebSocketMemoryInfoState : public DebuggerSubscriber {
public:
WebSocketMemoryInfoState() {
}
~WebSocketMemoryInfoState() override {
~WebSocketMemoryInfoState() {
UpdateOverride(false);
}

View File

@ -32,7 +32,7 @@ struct WebSocketSteppingState : public DebuggerSubscriber {
WebSocketSteppingState() {
disasm_.setCpu(currentDebugMIPS);
}
~WebSocketSteppingState() override {
~WebSocketSteppingState() {
disasm_.clear();
}

View File

@ -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);

View File

@ -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;
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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;
}

View File

@ -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;
};

View File

@ -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;
}

View File

@ -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.

View File

@ -27,7 +27,7 @@
class CachingFileLoader : public ProxiedFileLoader {
public:
CachingFileLoader(FileLoader *backend);
~CachingFileLoader() override;
~CachingFileLoader();
bool Exists() override;
bool ExistsFast() override;

View File

@ -31,7 +31,7 @@ class DiskCachingFileLoaderCache;
class DiskCachingFileLoader : public ProxiedFileLoader {
public:
DiskCachingFileLoader(FileLoader *backend);
~DiskCachingFileLoader() override;
~DiskCachingFileLoader();
bool Exists() override;
bool ExistsFast() override;

View File

@ -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;

View File

@ -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

View File

@ -27,7 +27,7 @@
class RamCachingFileLoader : public ProxiedFileLoader {
public:
RamCachingFileLoader(FileLoader *backend);
~RamCachingFileLoader() override;
~RamCachingFileLoader();
bool Exists() override;
bool ExistsFast() override;

View File

@ -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<PSPFileInfo> 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; }
};

View File

@ -94,7 +94,7 @@ public:
class ProxiedFileLoader : public FileLoader {
public:
ProxiedFileLoader(FileLoader *backend) : backend_(backend) {}
~ProxiedFileLoader() override {
~ProxiedFileLoader() {
// Takes ownership.
delete backend_;
}

View File

@ -136,7 +136,7 @@ private:
class IRJit : public JitInterface {
public:
IRJit(MIPSState *mipsState);
virtual ~IRJit();
~IRJit();
void DoState(PointerWrap &p) override;

View File

@ -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_;

View File

@ -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; }

View File

@ -41,7 +41,7 @@ public:
JPEGFileStream(const Path &filename) {
fp_ = File::OpenCFile(filename, "wb");
}
~JPEGFileStream() override {
~JPEGFileStream() {
if (fp_ ) {
fclose(fp_);
}

View File

@ -28,6 +28,8 @@ template <typename B, typename Event, typename EventType, EventType EVENT_INVALI
struct ThreadEventQueue : public B {
ThreadEventQueue() : threadEnabled_(false), eventsRunning_(false), eventsHaveRun_(false) {
}
virtual ~ThreadEventQueue() {
}
void SetThreadEnabled(bool threadEnabled) {
threadEnabled_ = threadEnabled;

View File

@ -190,6 +190,7 @@ struct GPUDebugVertex {
class GPUDebugInterface {
public:
virtual ~GPUDebugInterface() {}
virtual bool GetCurrentDisplayList(DisplayList &list) = 0;
virtual std::vector<DisplayList> ActiveDisplayLists() = 0;
virtual void ResetListPC(int listID, u32 pc) = 0;

View File

@ -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--;

View File

@ -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;

View File

@ -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;

View File

@ -105,7 +105,7 @@ public:
class DrawEngineDX9 : public DrawEngineCommon {
public:
DrawEngineDX9(Draw::DrawContext *draw);
virtual ~DrawEngineDX9();
~DrawEngineDX9();
void SetShaderManager(ShaderManagerDX9 *shaderManager) {
shaderManager_ = shaderManager;

View File

@ -54,9 +54,6 @@ protected:
void FinishDeferred() override;
private:
void Flush() {
drawEngine_.Flush();
}
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override;

View File

@ -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;

View File

@ -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() {

View File

@ -65,9 +65,6 @@ protected:
void FinishDeferred() override;
private:
void Flush() {
drawEngine_.Flush();
}
void CheckFlushOp(int cmd, u32 diff);
void BuildReportingInfo() override;

View File

@ -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_;

View File

@ -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();

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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_) {

View File

@ -334,7 +334,7 @@ public:
: gamePath_(gamePath), info_(info) {
}
~GameInfoWorkItem() override {
~GameInfoWorkItem() {
info_->pending.store(false);
info_->working.store(false);
info_->DisposeFileLoader();

View File

@ -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 &params);

View File

@ -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<UIScreen>(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;

View File

@ -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);
};

View File

@ -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<UIScreen>(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();
}

View File

@ -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:

View File

@ -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;

View File

@ -57,7 +57,7 @@ enum class ScanStatus {
class RemoteISOConnectScreen : public UIScreenWithBackground {
public:
RemoteISOConnectScreen();
~RemoteISOConnectScreen() override;
~RemoteISOConnectScreen();
const char *tag() const override { return "RemoteISOConnect"; }

View File

@ -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);

View File

@ -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;

View File

@ -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);

View File

@ -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;

View File

@ -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<DebugThreadInfo> 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<BreakPoint> displayedBreakPoints_;
std::vector<MemCheck> 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<MIPSStackWalk::StackFrame> 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<LoadedModuleInfo> modules;
DebugInterface* cpu;
};
};

View File

@ -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:

View File

@ -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;
};

View File

@ -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;

View File

@ -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();

View File

@ -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<DisplayList>& _lists) { lists = _lists; Update(); };
void setDisplayLists(const std::vector<DisplayList> &_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<DisplayList> 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);

View File

@ -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;

View File

@ -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);

View File

@ -38,7 +38,7 @@ public:
CMMNotificationClient() {
}
~CMMNotificationClient() {
virtual ~CMMNotificationClient() {
CoTaskMemFree(currentDevice_);
currentDevice_ = nullptr;
SAFE_RELEASE(_pEnumerator)

View File

@ -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 {}

View File

@ -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);

View File

@ -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_);

View File

@ -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());

View File

@ -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();
}