From f2de553d63580aa539deadafc17ce9e42f033d61 Mon Sep 17 00:00:00 2001 From: Akash Date: Fri, 9 Jun 2017 19:12:39 +0530 Subject: [PATCH] GSdx: Cleanup warnings on MSVC * Cast return value of IsEof() to bool. (Avoids int -> bool performance warning error) * Cast field and index to the required parameter type of AppendRawData. --- plugins/GSdx/GSDump.cpp | 4 ++-- plugins/GSdx/GSLzma.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/GSdx/GSDump.cpp b/plugins/GSdx/GSDump.cpp index 5735ba5158..9a222731a3 100644 --- a/plugins/GSdx/GSDump.cpp +++ b/plugins/GSdx/GSDump.cpp @@ -51,7 +51,7 @@ void GSDumpBase::Transfer(int index, const uint8* mem, size_t size) return; AppendRawData(0); - AppendRawData(index); + AppendRawData(static_cast(index)); AppendRawData(&size, 4); AppendRawData(mem, size); } @@ -75,7 +75,7 @@ bool GSDumpBase::VSync(int field, bool last, const GSPrivRegSet* regs) AppendRawData(regs, sizeof(*regs)); AppendRawData(1); - AppendRawData(field); + AppendRawData(static_cast(field)); if (last) m_extra_frames--; diff --git a/plugins/GSdx/GSLzma.cpp b/plugins/GSdx/GSLzma.cpp index 49ec535e2a..b0099b4f7d 100644 --- a/plugins/GSdx/GSLzma.cpp +++ b/plugins/GSdx/GSLzma.cpp @@ -159,7 +159,7 @@ GSDumpRaw::GSDumpRaw(char* filename, const char* repack_filename) : GSDumpFile(f } bool GSDumpRaw::IsEof() { - return feof(m_fp); + return !!feof(m_fp); } bool GSDumpRaw::Read(void* ptr, size_t size) {