Skip to content

VERY experimental Nintendo Switch 2 emulator

C++

surface_base: Make IsInside() a const member function

Lioncash4ce2aaa9d2ba
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h
index a39a8661bc..c5ab21f567 100644
--- a/src/video_core/texture_cache/surface_base.h
+++ b/src/video_core/texture_cache/surface_base.h
@@ -72,9 +72,9 @@ public:
return (cpu_addr < end) && (cpu_addr_end > start);
}
- bool IsInside(const GPUVAddr other_start, const GPUVAddr other_end) {
+ bool IsInside(const GPUVAddr other_start, const GPUVAddr other_end) const {
const GPUVAddr gpu_addr_end = gpu_addr + guest_memory_size;
- return (gpu_addr <= other_start && other_end <= gpu_addr_end);
+ return gpu_addr <= other_start && other_end <= gpu_addr_end;
}
// Use only when recycling a surface