diff options
| author | 2020-04-15 23:06:29 -0400 | |
|---|---|---|
| committer | 2020-04-17 00:59:36 -0400 | |
| commit | 92caa003a8fabf177f012a4f59ac4e123cbb4e98 (patch) | |
| tree | fd3c250905c8ae155e80292ffd4b9e8d5662db27 /src | |
| parent | memory: Add copyright notice for Atmosphere where applicable. (diff) | |
| download | yuzu-92caa003a8fabf177f012a4f59ac4e123cbb4e98.tar.gz yuzu-92caa003a8fabf177f012a4f59ac4e123cbb4e98.tar.xz yuzu-92caa003a8fabf177f012a4f59ac4e123cbb4e98.zip | |
core: device_memory: Remove incorrect usage of constexpr.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/device_memory.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/core/device_memory.h b/src/core/device_memory.h index cc7bda070..ff66e202d 100644 --- a/src/core/device_memory.h +++ b/src/core/device_memory.h | |||
| @@ -28,12 +28,16 @@ public: | |||
| 28 | ~DeviceMemory(); | 28 | ~DeviceMemory(); |
| 29 | 29 | ||
| 30 | template <typename T> | 30 | template <typename T> |
| 31 | constexpr PAddr GetPhysicalAddr(T* ptr) { | 31 | PAddr GetPhysicalAddr(const T* ptr) const { |
| 32 | return (reinterpret_cast<uintptr_t>(ptr) - reinterpret_cast<uintptr_t>(buffer.data())) + | 32 | return (reinterpret_cast<uintptr_t>(ptr) - reinterpret_cast<uintptr_t>(buffer.data())) + |
| 33 | DramMemoryMap::Base; | 33 | DramMemoryMap::Base; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | constexpr u8* GetPointer(PAddr addr) { | 36 | u8* GetPointer(PAddr addr) { |
| 37 | return buffer.data() + (addr - DramMemoryMap::Base); | ||
| 38 | } | ||
| 39 | |||
| 40 | const u8* GetPointer(PAddr addr) const { | ||
| 37 | return buffer.data() + (addr - DramMemoryMap::Base); | 41 | return buffer.data() + (addr - DramMemoryMap::Base); |
| 38 | } | 42 | } |
| 39 | 43 | ||