diff --git a/Common/Data/Text/I18n.h b/Common/Data/Text/I18n.h index 5f96ed5483..083528e0c3 100644 --- a/Common/Data/Text/I18n.h +++ b/Common/Data/Text/I18n.h @@ -88,7 +88,7 @@ public: // Try to avoid this. Still useful in snprintf. const char *T_cstr(const char *key, const char *def = nullptr); - const std::map Missed() const { + std::map Missed() const { std::lock_guard guard(missedKeyLock_); return missedKeyLog_; } diff --git a/Common/GPU/D3D11/thin3d_d3d11.cpp b/Common/GPU/D3D11/thin3d_d3d11.cpp index 1559a3cbe8..c9e7f3a291 100644 --- a/Common/GPU/D3D11/thin3d_d3d11.cpp +++ b/Common/GPU/D3D11/thin3d_d3d11.cpp @@ -1879,7 +1879,7 @@ void D3D11DrawContext::GetFramebufferDimensions(Framebuffer *fbo, int *w, int *h } } -DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *context, ID3D11Device1 *device1, ID3D11DeviceContext1 *context1, IDXGISwapChain *swapChain, D3D_FEATURE_LEVEL featureLevel, HWND hWnd, std::vector adapterNames, int maxInflightFrames) { +DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *context, ID3D11Device1 *device1, ID3D11DeviceContext1 *context1, IDXGISwapChain *swapChain, D3D_FEATURE_LEVEL featureLevel, HWND hWnd, const std::vector &adapterNames, int maxInflightFrames) { return new D3D11DrawContext(device, context, device1, context1, swapChain, featureLevel, hWnd, adapterNames, maxInflightFrames); } diff --git a/Common/GPU/thin3d_create.h b/Common/GPU/thin3d_create.h index 603db13d7c..81aba58a1e 100644 --- a/Common/GPU/thin3d_create.h +++ b/Common/GPU/thin3d_create.h @@ -28,7 +28,7 @@ DrawContext *T3DCreateGLContext(bool canChangeSwapInterval); #ifdef _WIN32 DrawContext *T3DCreateDX9Context(IDirect3D9 *d3d, IDirect3D9Ex *d3dEx, int adapterId, IDirect3DDevice9 *device, IDirect3DDevice9Ex *deviceEx); -DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *context, ID3D11Device1 *device1, ID3D11DeviceContext1 *context1, IDXGISwapChain *swapChain, D3D_FEATURE_LEVEL featureLevel, HWND hWnd, std::vector adapterNames, int maxInflightFrames); +DrawContext *T3DCreateD3D11Context(ID3D11Device *device, ID3D11DeviceContext *context, ID3D11Device1 *device1, ID3D11DeviceContext1 *context1, IDXGISwapChain *swapChain, D3D_FEATURE_LEVEL featureLevel, HWND hWnd, const std::vector &adapterNames, int maxInflightFrames); #endif DrawContext *T3DCreateVulkanContext(VulkanContext *context, bool useRenderThread); diff --git a/Core/Debugger/Breakpoints.cpp b/Core/Debugger/Breakpoints.cpp index b02b35c7ad..1789cb2c94 100644 --- a/Core/Debugger/Breakpoints.cpp +++ b/Core/Debugger/Breakpoints.cpp @@ -622,20 +622,20 @@ void CBreakPoints::UpdateCachedMemCheckRanges() { } } -const std::vector CBreakPoints::GetMemCheckRanges(bool write) { +std::vector CBreakPoints::GetMemCheckRanges(bool write) { std::lock_guard guard(memCheckMutex_); if (write) return memCheckRangesWrite_; return memCheckRangesRead_; } -const std::vector CBreakPoints::GetMemChecks() +std::vector CBreakPoints::GetMemChecks() { std::lock_guard guard(memCheckMutex_); return memChecks_; } -const std::vector CBreakPoints::GetBreakpoints() +std::vector CBreakPoints::GetBreakpoints() { std::lock_guard guard(breakPointsMutex_); return breakPoints_; diff --git a/Core/Debugger/Breakpoints.h b/Core/Debugger/Breakpoints.h index 4449656093..88add84761 100644 --- a/Core/Debugger/Breakpoints.h +++ b/Core/Debugger/Breakpoints.h @@ -161,10 +161,10 @@ public: static u32 CheckSkipFirst(); // Includes uncached addresses. - static const std::vector GetMemCheckRanges(bool write); + static std::vector GetMemCheckRanges(bool write); - static const std::vector GetMemChecks(); - static const std::vector GetBreakpoints(); + static std::vector GetMemChecks(); + static std::vector GetBreakpoints(); static bool HasBreakPoints(); static bool HasMemChecks(); diff --git a/Core/Dialog/PSPSaveDialog.cpp b/Core/Dialog/PSPSaveDialog.cpp index 322315d8bc..f60f60c6f3 100755 --- a/Core/Dialog/PSPSaveDialog.cpp +++ b/Core/Dialog/PSPSaveDialog.cpp @@ -308,7 +308,7 @@ int PSPSaveDialog::Init(int paramAddr) return retval; } -const std::string PSPSaveDialog::GetSelectedSaveDirName() const +std::string PSPSaveDialog::GetSelectedSaveDirName() const { switch ((SceUtilitySavedataType)(u32)param.GetPspParam()->mode) { diff --git a/Core/Dialog/PSPSaveDialog.h b/Core/Dialog/PSPSaveDialog.h index 6c28f716a9..5c452a3c84 100644 --- a/Core/Dialog/PSPSaveDialog.h +++ b/Core/Dialog/PSPSaveDialog.h @@ -95,7 +95,7 @@ private: void DisplaySaveDataInfo1(); void DisplaySaveDataInfo2(bool showNewData = false); void DisplayMessage(std::string_view text, bool hasYesNo = false); - const std::string GetSelectedSaveDirName() const; + std::string GetSelectedSaveDirName() const; void JoinIOThread(); void StartIOThread(); diff --git a/Core/MIPS/IR/IRJit.cpp b/Core/MIPS/IR/IRJit.cpp index 8329dc030a..bc866ee04b 100644 --- a/Core/MIPS/IR/IRJit.cpp +++ b/Core/MIPS/IR/IRJit.cpp @@ -387,7 +387,7 @@ std::vector IRBlockCache::SaveAndClearEmuHackOps() { return result; } -void IRBlockCache::RestoreSavedEmuHackOps(std::vector saved) { +void IRBlockCache::RestoreSavedEmuHackOps(const std::vector &saved) { if ((int)blocks_.size() != (int)saved.size()) { ERROR_LOG(JIT, "RestoreSavedEmuHackOps: Wrong saved block size."); return; diff --git a/Core/MIPS/IR/IRJit.h b/Core/MIPS/IR/IRJit.h index cd751ba7df..60460ea878 100644 --- a/Core/MIPS/IR/IRJit.h +++ b/Core/MIPS/IR/IRJit.h @@ -139,7 +139,7 @@ public: int FindByCookie(int cookie); std::vector SaveAndClearEmuHackOps(); - void RestoreSavedEmuHackOps(std::vector saved); + void RestoreSavedEmuHackOps(const std::vector &saved); JitBlockDebugInfo GetBlockDebugInfo(int blockNum) const override; void ComputeStats(BlockCacheStats &bcStats) const override; diff --git a/Core/MIPS/JitCommon/JitBlockCache.cpp b/Core/MIPS/JitCommon/JitBlockCache.cpp index b428b31fb7..120207eb60 100644 --- a/Core/MIPS/JitCommon/JitBlockCache.cpp +++ b/Core/MIPS/JitCommon/JitBlockCache.cpp @@ -497,7 +497,7 @@ std::vector JitBlockCache::SaveAndClearEmuHackOps() { return result; } -void JitBlockCache::RestoreSavedEmuHackOps(std::vector saved) { +void JitBlockCache::RestoreSavedEmuHackOps(const std::vector &saved) { if (num_blocks_ != (int)saved.size()) { ERROR_LOG(JIT, "RestoreSavedEmuHackOps: Wrong saved block size."); return; diff --git a/Core/MIPS/JitCommon/JitBlockCache.h b/Core/MIPS/JitCommon/JitBlockCache.h index 09eae3cc21..bcf1f5c083 100644 --- a/Core/MIPS/JitCommon/JitBlockCache.h +++ b/Core/MIPS/JitCommon/JitBlockCache.h @@ -161,7 +161,7 @@ public: // No jit operations may be run between these calls. // Meant to be used to make memory safe for savestates, memcpy, etc. std::vector SaveAndClearEmuHackOps(); - void RestoreSavedEmuHackOps(std::vector saved); + void RestoreSavedEmuHackOps(const std::vector &saved); int GetNumBlocks() const override { return num_blocks_; } diff --git a/UI/MainScreen.cpp b/UI/MainScreen.cpp index 76350967df..f0e2005bfe 100644 --- a/UI/MainScreen.cpp +++ b/UI/MainScreen.cpp @@ -951,7 +951,7 @@ bool GameBrowser::IsCurrentPathPinned() { return std::find(paths.begin(), paths.end(), File::ResolvePath(path_.GetPath().ToString())) != paths.end(); } -const std::vector GameBrowser::GetPinnedPaths() { +std::vector GameBrowser::GetPinnedPaths() const { #ifndef _WIN32 static const std::string sepChars = "/"; #else @@ -979,7 +979,7 @@ const std::vector GameBrowser::GetPinnedPaths() { return results; } -const std::string GameBrowser::GetBaseName(const std::string &path) { +std::string GameBrowser::GetBaseName(const std::string &path) const { #ifndef _WIN32 static const std::string sepChars = "/"; #else diff --git a/UI/MainScreen.h b/UI/MainScreen.h index 8c8ae4056f..26cbf2d463 100644 --- a/UI/MainScreen.h +++ b/UI/MainScreen.h @@ -72,8 +72,8 @@ protected: private: bool IsCurrentPathPinned(); - const std::vector GetPinnedPaths(); - const std::string GetBaseName(const std::string &path); + std::vector GetPinnedPaths() const; + std::string GetBaseName(const std::string &path) const; UI::EventReturn GameButtonClick(UI::EventParams &e); UI::EventReturn GameButtonHoldClick(UI::EventParams &e); diff --git a/Windows/Debugger/Debugger_MemoryDlg.cpp b/Windows/Debugger/Debugger_MemoryDlg.cpp index b247459bbf..670713e1c3 100644 --- a/Windows/Debugger/Debugger_MemoryDlg.cpp +++ b/Windows/Debugger/Debugger_MemoryDlg.cpp @@ -115,7 +115,7 @@ void CMemoryDlg::Update(void) } } -void CMemoryDlg::searchBoxRedraw(std::vector results) { +void CMemoryDlg::searchBoxRedraw(const std::vector &results) { wchar_t temp[256]{}; SendMessage(srcListHdl, WM_SETREDRAW, FALSE, 0); ListBox_ResetContent(srcListHdl); diff --git a/Windows/Debugger/Debugger_MemoryDlg.h b/Windows/Debugger/Debugger_MemoryDlg.h index d69643a832..9b216ba1e1 100644 --- a/Windows/Debugger/Debugger_MemoryDlg.h +++ b/Windows/Debugger/Debugger_MemoryDlg.h @@ -22,7 +22,7 @@ private: public: int index; //helper - void searchBoxRedraw(std::vector results); + void searchBoxRedraw(const std::vector &results); // constructor CMemoryDlg(HINSTANCE _hInstance, HWND _hParent, DebugInterface *_cpu);