diff options
| author | Rodrigo Locatti <reinuseslisp@airmail.cc> | 2019-11-13 02:16:22 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-13 02:16:22 -0300 |
| commit | cf770a68a528cdb7f3a5483f6d17eeb924e37b7e (patch) | |
| tree | 6406933e26e9fbe255a04b4c0810d21b05815494 /src/video_core/textures/texture.h | |
| parent | d1f0d182a73f79f7b82751f4ac1502e7eb9bba76 (diff) | |
| parent | fb9418798d9421128c17a52c2b0160d71f015db0 (diff) | |
Merge pull request #3084 from ReinUsesLisp/cast-warnings
video_core: Treat implicit conversions as errors
Diffstat (limited to 'src/video_core/textures/texture.h')
| -rw-r--r-- | src/video_core/textures/texture.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/video_core/textures/texture.h b/src/video_core/textures/texture.h index 27c8ce975..8e82c6748 100644 --- a/src/video_core/textures/texture.h +++ b/src/video_core/textures/texture.h @@ -342,13 +342,14 @@ struct TSCEntry { float GetLodBias() const { // Sign extend the 13-bit value. constexpr u32 mask = 1U << (13 - 1); - return static_cast<s32>((mip_lod_bias ^ mask) - mask) / 256.0f; + return static_cast<float>(static_cast<s32>((mip_lod_bias ^ mask) - mask)) / 256.0f; } std::array<float, 4> GetBorderColor() const { if (srgb_conversion) { - return {srgb_border_color_r / 255.0f, srgb_border_color_g / 255.0f, - srgb_border_color_b / 255.0f, border_color[3]}; + return {static_cast<float>(srgb_border_color_r) / 255.0f, + static_cast<float>(srgb_border_color_g) / 255.0f, + static_cast<float>(srgb_border_color_b) / 255.0f, border_color[3]}; } return border_color; } |
