From 708c986693ced6a50e04e4935ca5cabcbaf8bb46 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 13 Jun 2023 08:25:24 -0400 Subject: [PATCH] PPCCache: Remove redundant reinterpret_casts The pointer is being passed to functions that take arguments as void*, so we don't need to cast here. --- Source/Core/Core/PowerPC/PPCCache.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/Core/Core/PowerPC/PPCCache.cpp b/Source/Core/Core/PowerPC/PPCCache.cpp index 0b3f23079a..62fda8576e 100644 --- a/Source/Core/Core/PowerPC/PPCCache.cpp +++ b/Source/Core/Core/PowerPC/PPCCache.cpp @@ -144,7 +144,7 @@ void Cache::Store(u32 addr) return; if (valid[set] & (1U << way) && modified[set] & (1U << way)) - memory.CopyToEmu((addr & ~0x1f), reinterpret_cast(data[set][way].data()), 32); + memory.CopyToEmu((addr & ~0x1f), data[set][way].data(), 32); modified[set] &= ~(1U << way); } @@ -158,7 +158,7 @@ void Cache::FlushAll() for (size_t way = 0; way < CACHE_WAYS; way++) { if (valid[set] & (1U << way) && modified[set] & (1U << way)) - memory.CopyToEmu(addrs[set][way], reinterpret_cast(data[set][way].data()), 32); + memory.CopyToEmu(addrs[set][way], data[set][way].data(), 32); } } @@ -202,7 +202,7 @@ void Cache::Flush(u32 addr) if (valid[set] & (1U << way)) { if (modified[set] & (1U << way)) - memory.CopyToEmu((addr & ~0x1f), reinterpret_cast(data[set][way].data()), 32); + memory.CopyToEmu((addr & ~0x1f), data[set][way].data(), 32); if (addrs[set][way] & CACHE_VMEM_BIT) lookup_table_vmem[(addrs[set][way] & memory.GetFakeVMemMask()) >> 5] = 0xff; @@ -256,7 +256,7 @@ std::pair Cache::GetCache(u32 addr, bool locked) { // store the cache back to main memory if (modified[set] & (1 << way)) - memory.CopyToEmu(addrs[set][way], reinterpret_cast(data[set][way].data()), 32); + memory.CopyToEmu(addrs[set][way], data[set][way].data(), 32); if (addrs[set][way] & CACHE_VMEM_BIT) lookup_table_vmem[(addrs[set][way] & memory.GetFakeVMemMask()) >> 5] = 0xff; @@ -267,7 +267,7 @@ std::pair Cache::GetCache(u32 addr, bool locked) } // load - memory.CopyFromEmu(reinterpret_cast(data[set][way].data()), (addr & ~0x1f), 32); + memory.CopyFromEmu(data[set][way].data(), (addr & ~0x1f), 32); if (addr & CACHE_VMEM_BIT) lookup_table_vmem[(addr & memory.GetFakeVMemMask()) >> 5] = way;