summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-02-15 11:30:48 +0100
committerPierre Bourdon <delroth@gmail.com>2014-02-16 19:22:40 +0100
commit96a66ada2e11420aeaf90df37100d67796c0bdf5 (patch)
treec27d33a1b27de83d378708f9c966c1a1b8d16af5 /Source/Core
parent92f8d93e969abf942002439ef583d2a25acad019 (diff)
Use a pointer instead of a non-const ref in MMIO::Mapping::Read now that compatibility with the old interface is not required anymore.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/MMIO.h6
-rw-r--r--Source/Core/Core/HW/MemmapFunctions.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/Source/Core/Core/HW/MMIO.h b/Source/Core/Core/HW/MMIO.h
index 41353b7858..35f83d8b99 100644
--- a/Source/Core/Core/HW/MMIO.h
+++ b/Source/Core/Core/HW/MMIO.h
@@ -92,10 +92,10 @@ public:
// Note that for reads we cannot simply return the read value because C++
// allows overloading only with parameter types, not return types.
#define READ_FUNC(Size) \
- void Read(u32 addr, u##Size& val) const \
+ void Read(u32 addr, u##Size* val) const \
{ \
u32 id = UniqueID(addr) / sizeof (u##Size); \
- val = m_Read##Size##Handlers[id].Read(addr); \
+ *val = m_Read##Size##Handlers[id].Read(addr); \
}
READ_FUNC(8) READ_FUNC(16) READ_FUNC(32)
#undef READ_FUNC
@@ -134,7 +134,7 @@ public:
// Dummy 64 bits variants of these functions. While 64 bits MMIO access is
// not supported, we need these in order to make the code compile.
- void Read(u32 addr, u64& val) const { _dbg_assert_(MEMMAP, 0); }
+ void Read(u32 addr, u64* val) const { _dbg_assert_(MEMMAP, 0); }
void Write(u32 addr, u64 val) const { _dbg_assert_(MEMMAP, 0); }
private:
diff --git a/Source/Core/Core/HW/MemmapFunctions.cpp b/Source/Core/Core/HW/MemmapFunctions.cpp
index 404df6aeee..895d861f05 100644
--- a/Source/Core/Core/HW/MemmapFunctions.cpp
+++ b/Source/Core/Core/HW/MemmapFunctions.cpp
@@ -98,7 +98,7 @@ inline void ReadFromHardware(T &_var, const u32 em_address, const u32 effective_
if (em_address < 0xcc000000)
_var = EFB_Read(em_address);
else
- mmio_mapping->Read(em_address, _var);
+ mmio_mapping->Read(em_address, &_var);
}
else if (((em_address & 0xF0000000) == 0x80000000) ||
((em_address & 0xF0000000) == 0xC0000000) ||