From 3ffa5eb61358077eeed365d71d7dc07dea7be663 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Mon, 2 Jan 2023 23:13:47 +1000 Subject: [PATCH] GS: Add const to GSDirtyRect functions --- pcsx2/GS/Renderers/Common/GSDirtyRect.cpp | 4 ++-- pcsx2/GS/Renderers/Common/GSDirtyRect.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp b/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp index fba385016d..b18edef089 100644 --- a/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp +++ b/pcsx2/GS/Renderers/Common/GSDirtyRect.cpp @@ -30,7 +30,7 @@ GSDirtyRect::GSDirtyRect(GSVector4i& r, u32 psm, u32 bw) : { } -GSVector4i GSDirtyRect::GetDirtyRect(GIFRegTEX0& TEX0) +GSVector4i GSDirtyRect::GetDirtyRect(GIFRegTEX0& TEX0) const { GSVector4i _r; @@ -55,7 +55,7 @@ GSVector4i GSDirtyRect::GetDirtyRect(GIFRegTEX0& TEX0) // -GSVector4i GSDirtyRectList::GetDirtyRect(GIFRegTEX0& TEX0, const GSVector2i& size) +GSVector4i GSDirtyRectList::GetDirtyRect(GIFRegTEX0& TEX0, const GSVector2i& size) const { if (!empty()) { diff --git a/pcsx2/GS/Renderers/Common/GSDirtyRect.h b/pcsx2/GS/Renderers/Common/GSDirtyRect.h index 4505fef267..d1d8a784ae 100644 --- a/pcsx2/GS/Renderers/Common/GSDirtyRect.h +++ b/pcsx2/GS/Renderers/Common/GSDirtyRect.h @@ -26,13 +26,13 @@ public: GSDirtyRect(); GSDirtyRect(GSVector4i& r, u32 psm, u32 bw); - GSVector4i GetDirtyRect(GIFRegTEX0& TEX0); + GSVector4i GetDirtyRect(GIFRegTEX0& TEX0) const; }; class GSDirtyRectList : public std::vector { public: GSDirtyRectList() {} - GSVector4i GetDirtyRect(GIFRegTEX0& TEX0, const GSVector2i& size); + GSVector4i GetDirtyRect(GIFRegTEX0& TEX0, const GSVector2i& size) const; GSVector4i GetDirtyRectAndClear(GIFRegTEX0& TEX0, const GSVector2i& size); };