Update src/core/memory.cpp

Co-authored-by: LC <mathew1800@gmail.com>
This commit is contained in:
bunnei
2020-12-20 22:52:13 -08:00
committed by GitHub
parent a1dd8d5d3b
commit f5d875a407

View File

@@ -646,7 +646,7 @@ struct Memory::Impl {
template <typename T>
T Read(const VAddr vaddr) {
// Avoid adding any extra logic to this fast-path block
if (const u8* const pointer = current_page_table->pointers[vaddr >> PAGE_BITS]; pointer) {
if (const u8* const pointer = current_page_table->pointers[vaddr >> PAGE_BITS]) {
T value;
std::memcpy(&value, &pointer[vaddr], sizeof(T));
return value;