summaryrefslogtreecommitdiff
path: root/src/core/hw
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hw')
-rw-r--r--src/core/hw/gpu.cpp4
-rw-r--r--src/core/hw/gpu.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hw/gpu.cpp b/src/core/hw/gpu.cpp
index 7afb00d6c..9c7192313 100644
--- a/src/core/hw/gpu.cpp
+++ b/src/core/hw/gpu.cpp
@@ -27,7 +27,7 @@ u64 g_last_frame_ticks = 0; ///< CPU tick count from last frame
27template <typename T> 27template <typename T>
28inline void Read(T &var, const u32 raw_addr) { 28inline void Read(T &var, const u32 raw_addr) {
29 u32 addr = raw_addr - 0x1EF00000; 29 u32 addr = raw_addr - 0x1EF00000;
30 int index = addr / 4; 30 u32 index = addr / 4;
31 31
32 // Reads other than u32 are untested, so I'd rather have them abort than silently fail 32 // Reads other than u32 are untested, so I'd rather have them abort than silently fail
33 if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { 33 if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
@@ -41,7 +41,7 @@ inline void Read(T &var, const u32 raw_addr) {
41template <typename T> 41template <typename T>
42inline void Write(u32 addr, const T data) { 42inline void Write(u32 addr, const T data) {
43 addr -= 0x1EF00000; 43 addr -= 0x1EF00000;
44 int index = addr / 4; 44 u32 index = addr / 4;
45 45
46 // Writes other than u32 are untested, so I'd rather have them abort than silently fail 46 // Writes other than u32 are untested, so I'd rather have them abort than silently fail
47 if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) { 47 if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h
index 7186bfa84..c853429a0 100644
--- a/src/core/hw/gpu.h
+++ b/src/core/hw/gpu.h
@@ -201,7 +201,7 @@ struct Regs {
201#undef INSERT_PADDING_WORDS_HELPER2 201#undef INSERT_PADDING_WORDS_HELPER2
202#undef INSERT_PADDING_WORDS 202#undef INSERT_PADDING_WORDS
203 203
204 static inline int NumIds() { 204 static inline size_t NumIds() {
205 return sizeof(Regs) / sizeof(u32); 205 return sizeof(Regs) / sizeof(u32);
206 } 206 }
207 207