aboutsummaryrefslogtreecommitdiff
path: root/src/video_core/debug_utils/debug_utils.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-03-16 18:18:24 -0400
committerbunnei <bunneidev@gmail.com>2015-03-16 18:18:24 -0400
commit968c418fa537b8843bd220379b876cc525b31378 (patch)
tree6583aea801328cfc9ff3a33d58ac72d4c060517e /src/video_core/debug_utils/debug_utils.cpp
parente4e2c929af8953fd9946d2556b112b80c9b0ffb5 (diff)
parent92fd2a1ee30b4c0b5af9ebb268f8f1ace649f371 (diff)
Merge pull request #662 from linkmauve/video_core-warnings
Add static_cast around expressions where the compiler doesn’t deduce the right type
Diffstat (limited to 'src/video_core/debug_utils/debug_utils.cpp')
-rw-r--r--src/video_core/debug_utils/debug_utils.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp
index 745c4f4ed..83982b4f2 100644
--- a/src/video_core/debug_utils/debug_utils.cpp
+++ b/src/video_core/debug_utils/debug_utils.cpp
@@ -322,7 +322,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::RGBA8:
{
auto res = Color::DecodeRGBA8(source + VideoCore::GetMortonOffset(x, y, 4));
- return { res.r(), res.g(), res.b(), disable_alpha ? 255 : res.a() };
+ return { res.r(), res.g(), res.b(), static_cast<u8>(disable_alpha ? 255 : res.a()) };
}
case Regs::TextureFormat::RGB8:
@@ -334,7 +334,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::RGB5A1:
{
auto res = Color::DecodeRGB5A1(source + VideoCore::GetMortonOffset(x, y, 2));
- return { res.r(), res.g(), res.b(), disable_alpha ? 255 : res.a() };
+ return { res.r(), res.g(), res.b(), static_cast<u8>(disable_alpha ? 255 : res.a()) };
}
case Regs::TextureFormat::RGB565:
@@ -346,7 +346,7 @@ const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const Texture
case Regs::TextureFormat::RGBA4:
{
auto res = Color::DecodeRGBA4(source + VideoCore::GetMortonOffset(x, y, 2));
- return { res.r(), res.g(), res.b(), disable_alpha ? 255 : res.a() };
+ return { res.r(), res.g(), res.b(), static_cast<u8>(disable_alpha ? 255 : res.a()) };
}
case Regs::TextureFormat::IA8: