summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2021-04-12 10:51:16 +0200
committerLioncash <mathew1800@gmail.com>2021-04-12 10:51:18 +0200
commit420958850566dcf5c4a7539c947ac25d25a31d92 (patch)
tree4b4d8ecae1db434a71920d2ac7a99b868e26a622 /src
parentMerge pull request #6135 from Morph1984/borderless-windowed-fullscreen (diff)
downloadyuzu-420958850566dcf5c4a7539c947ac25d25a31d92.tar
yuzu-420958850566dcf5c4a7539c947ac25d25a31d92.tar.gz
yuzu-420958850566dcf5c4a7539c947ac25d25a31d92.tar.bz2
yuzu-420958850566dcf5c4a7539c947ac25d25a31d92.tar.lz
yuzu-420958850566dcf5c4a7539c947ac25d25a31d92.tar.xz
yuzu-420958850566dcf5c4a7539c947ac25d25a31d92.tar.zst
yuzu-420958850566dcf5c4a7539c947ac25d25a31d92.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/query_cache.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h
index 203f2af05..639d7ce7e 100644
--- a/src/video_core/query_cache.h
+++ b/src/video_core/query_cache.h
@@ -208,9 +208,9 @@ public:
private:
/// Flushes a memory range to guest memory and removes it from the cache.
void FlushAndRemoveRegion(VAddr addr, std::size_t size) {
- const u64 addr_begin = static_cast<u64>(addr);
- const u64 addr_end = addr_begin + static_cast<u64>(size);
- const auto in_range = [addr_begin, addr_end](CachedQuery& query) {
+ const u64 addr_begin = addr;
+ const u64 addr_end = addr_begin + size;
+ const auto in_range = [addr_begin, addr_end](const CachedQuery& query) {
const u64 cache_begin = query.GetCpuAddr();
const u64 cache_end = cache_begin + query.SizeInBytes();
return cache_begin < addr_end && addr_begin < cache_end;
@@ -230,8 +230,7 @@ private:
rasterizer.UpdatePagesCachedCount(query.GetCpuAddr(), query.SizeInBytes(), -1);
query.Flush();
}
- contents.erase(std::remove_if(std::begin(contents), std::end(contents), in_range),
- std::end(contents));
+ std::erase_if(contents, in_range);
}
}