From ff034411ac14beac460ed9a8a246e774bdcb7050 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Tue, 13 Apr 2021 03:45:40 +0200 Subject: [PATCH] early-access version 1593 --- README.md | 2 +- src/video_core/query_cache.h | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 29d9a0bc1..9d690a266 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 1592. +This is the source code for early-access 1593. ## Legal Notice diff --git a/src/video_core/query_cache.h b/src/video_core/query_cache.h index 203f2af05..639d7ce7e 100755 --- 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(addr); - const u64 addr_end = addr_begin + static_cast(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); } }