From 6803ceb8865e611ffded1b42eafaa4a2dc197d21 Mon Sep 17 00:00:00 2001 From: Bonta-kun Date: Tue, 26 Apr 2016 06:10:30 +0200 Subject: [PATCH] compile fix --- src/core/arm/cache/cache.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/core/arm/cache/cache.cpp b/src/core/arm/cache/cache.cpp index df3a3e349..25af75289 100644 --- a/src/core/arm/cache/cache.cpp +++ b/src/core/arm/cache/cache.cpp @@ -87,11 +87,9 @@ void CacheBase::OnCodeLoad(u32 address, u32 size) { } void CacheBase::OnCodeUnload(u32 address, u32 size) { - const u32 end = address + size; - ptr_caches.erase(std::remove_if(ptr_caches.begin(), ptr_caches.end(), [&](auto const& cache) { - if ((address < cache.addr_end) && (end > cache.addr)) { + if ((address < cache.addr_end) && (address + size > cache.addr)) { RemoveRange(cache.addr, cache.addr_end); for (u32 i = cache.addr; i < cache.addr_end; i += Memory::PAGE_SIZE) { page_pointers[i >> Memory::PAGE_BITS] = nullptr; } return true;