From 58ed49f3c90d5cdf273c54584a74055d3a47ce74 Mon Sep 17 00:00:00 2001 From: Akash Date: Fri, 4 Nov 2016 23:42:12 +0530 Subject: [PATCH] GSDX: Clean up warnings on MSVC * Explicitly cast w_pages and h_pages into uint32. * Prevent signed/unsigned comparison by converting lod into unsigned integer, honestly how coud a mipmapping level be negative? --- plugins/GSdx/GSRendererHW.cpp | 4 ++-- plugins/GSdx/GSState.cpp | 2 +- plugins/GSdx/GSState.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/GSdx/GSRendererHW.cpp b/plugins/GSdx/GSRendererHW.cpp index e6cc7cdfd5..fe5c6673e3 100644 --- a/plugins/GSdx/GSRendererHW.cpp +++ b/plugins/GSdx/GSRendererHW.cpp @@ -920,8 +920,8 @@ void GSRendererHW::OI_DoubleHalfClear(GSTexture* rt, GSTexture* ds) // return; // Size of the current draw - uint32 w_pages = roundf(m_vt.m_max.p.x / frame_psm.pgs.x); - uint32 h_pages = roundf(m_vt.m_max.p.y / frame_psm.pgs.y); + uint32 w_pages = static_cast(roundf(m_vt.m_max.p.x / frame_psm.pgs.x)); + uint32 h_pages = static_cast(roundf(m_vt.m_max.p.y / frame_psm.pgs.y)); uint32 written_pages = w_pages * h_pages; // Frame and depth pointer can be inverted diff --git a/plugins/GSdx/GSState.cpp b/plugins/GSdx/GSState.cpp index 5278b5d85a..a4d0ddf03f 100644 --- a/plugins/GSdx/GSState.cpp +++ b/plugins/GSdx/GSState.cpp @@ -3200,7 +3200,7 @@ bool GSState::IsMipMapActive() return m_mipmap && IsMipMapDraw(); } -GIFRegTEX0 GSState::GetTex0Layer(int lod) +GIFRegTEX0 GSState::GetTex0Layer(uint32 lod) { // Shortcut if (lod == 0) { diff --git a/plugins/GSdx/GSState.h b/plugins/GSdx/GSState.h index e12ce478ce..2fad88beb3 100644 --- a/plugins/GSdx/GSState.h +++ b/plugins/GSdx/GSState.h @@ -206,7 +206,7 @@ protected: bool IsOpaque(); bool IsMipMapDraw(); bool IsMipMapActive(); - GIFRegTEX0 GetTex0Layer(int lod); + GIFRegTEX0 GetTex0Layer(uint32 lod); public: GIFPath m_path[4];