فهرست منبع

surface_base: Make IsInside() a const member function

This doesn't modify internal state, so this can be made const.
Lioncash 6 سال پیش
والد
کامیت
d551c910bb
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      src/video_core/texture_cache/surface_base.h

+ 2 - 2
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