summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2014-10-09 05:06:28 +0200
committerbunnei <bunneidev@gmail.com>2014-10-09 05:06:28 +0200
commit8fb064cd62d3091b88bb2660a0264997f5cb163d (patch)
treea7f2983c43d910b15fe42396e074f5b26cab5ff8 /src/core
parentMerge pull request #128 from purpasmart96/master (diff)
parentFix warnings in video_core (diff)
downloadyuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.tar
yuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.tar.gz
yuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.tar.bz2
yuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.tar.lz
yuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.tar.xz
yuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.tar.zst
yuzu-8fb064cd62d3091b88bb2660a0264997f5cb163d.zip
Diffstat (limited to 'src/core')
-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
template <typename T>
inline void Read(T &var, const u32 raw_addr) {
u32 addr = raw_addr - 0x1EF00000;
- int index = addr / 4;
+ u32 index = addr / 4;
// Reads other than u32 are untested, so I'd rather have them abort than silently fail
if (index >= Regs::NumIds() || !std::is_same<T,u32>::value) {
@@ -41,7 +41,7 @@ inline void Read(T &var, const u32 raw_addr) {
template <typename T>
inline void Write(u32 addr, const T data) {
addr -= 0x1EF00000;
- int index = addr / 4;
+ u32 index = addr / 4;
// Writes other than u32 are untested, so I'd rather have them abort than silently fail
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 {
#undef INSERT_PADDING_WORDS_HELPER2
#undef INSERT_PADDING_WORDS
- static inline int NumIds() {
+ static inline size_t NumIds() {
return sizeof(Regs) / sizeof(u32);
}