diff options
| author | 2020-04-15 23:59:33 -0400 | |
|---|---|---|
| committer | 2020-04-15 23:59:35 -0400 | |
| commit | d551c910bbd0570e953b3c769e08ae7edc495e3c (patch) | |
| tree | 8cf03f274d5aa53bc00ac253d017e115cbbc5636 | |
| parent | Merge pull request #3612 from ReinUsesLisp/red (diff) | |
| download | yuzu-d551c910bbd0570e953b3c769e08ae7edc495e3c.tar.gz yuzu-d551c910bbd0570e953b3c769e08ae7edc495e3c.tar.xz yuzu-d551c910bbd0570e953b3c769e08ae7edc495e3c.zip | |
surface_base: Make IsInside() a const member function
This doesn't modify internal state, so this can be made const.
| -rw-r--r-- | src/video_core/texture_cache/surface_base.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/surface_base.h b/src/video_core/texture_cache/surface_base.h index a39a8661b..c5ab21f56 100644 --- a/src/video_core/texture_cache/surface_base.h +++ b/src/video_core/texture_cache/surface_base.h | |||
| @@ -72,9 +72,9 @@ public: | |||
| 72 | return (cpu_addr < end) && (cpu_addr_end > start); | 72 | return (cpu_addr < end) && (cpu_addr_end > start); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| 75 | bool IsInside(const GPUVAddr other_start, const GPUVAddr other_end) { | 75 | bool IsInside(const GPUVAddr other_start, const GPUVAddr other_end) const { |
| 76 | const GPUVAddr gpu_addr_end = gpu_addr + guest_memory_size; | 76 | const GPUVAddr gpu_addr_end = gpu_addr + guest_memory_size; |
| 77 | return (gpu_addr <= other_start && other_end <= gpu_addr_end); | 77 | return gpu_addr <= other_start && other_end <= gpu_addr_end; |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | // Use only when recycling a surface | 80 | // Use only when recycling a surface |