summaryrefslogtreecommitdiff
path: root/src/video_core/buffer_cache
diff options
context:
space:
mode:
authorGravatar Lioncash2020-12-07 16:30:36 -0500
committerGravatar Lioncash2020-12-07 16:30:39 -0500
commit09fa1d6a739b18f6a8f3d83065ff9aebd6e4bc8d (patch)
tree3ea0bbe356d45a250b1b5300773bc2c419a39c19 /src/video_core/buffer_cache
parentMerge pull request #5149 from comex/xx-map-interval (diff)
downloadyuzu-09fa1d6a739b18f6a8f3d83065ff9aebd6e4bc8d.tar.gz
yuzu-09fa1d6a739b18f6a8f3d83065ff9aebd6e4bc8d.tar.xz
yuzu-09fa1d6a739b18f6a8f3d83065ff9aebd6e4bc8d.zip
video_core: Make use of ordered container contains() where applicable
With C++20, we can use the more concise contains() member function instead of comparing the result of the find() call with the end iterator.
Diffstat (limited to 'src/video_core/buffer_cache')
-rw-r--r--src/video_core/buffer_cache/buffer_cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/video_core/buffer_cache/buffer_cache.h b/src/video_core/buffer_cache/buffer_cache.h
index e7edd733f..38961f3fd 100644
--- a/src/video_core/buffer_cache/buffer_cache.h
+++ b/src/video_core/buffer_cache/buffer_cache.h
@@ -545,7 +545,7 @@ private:
545 bool IsRegionWritten(VAddr start, VAddr end) const { 545 bool IsRegionWritten(VAddr start, VAddr end) const {
546 const u64 page_end = end >> WRITE_PAGE_BIT; 546 const u64 page_end = end >> WRITE_PAGE_BIT;
547 for (u64 page_start = start >> WRITE_PAGE_BIT; page_start <= page_end; ++page_start) { 547 for (u64 page_start = start >> WRITE_PAGE_BIT; page_start <= page_end; ++page_start) {
548 if (written_pages.count(page_start) > 0) { 548 if (written_pages.contains(page_start)) {
549 return true; 549 return true;
550 } 550 }
551 } 551 }