From 559f989dce751c038d01f9e15b77fdb73dcdde7f Mon Sep 17 00:00:00 2001 From: Sour Date: Sat, 19 Oct 2019 15:39:20 -0400 Subject: [PATCH] Linux: Fixed compilation warnings/errors --- Core/CheatManager.cpp | 4 ++-- Core/InputHud.cpp | 2 +- Core/RecordedRomTest.h | 2 +- Core/stdafx.h | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Core/CheatManager.cpp b/Core/CheatManager.cpp index 6e8a922..41296b4 100644 --- a/Core/CheatManager.cpp +++ b/Core/CheatManager.cpp @@ -71,7 +71,7 @@ void CheatManager::AddStringCheat(string code) if(code.size() == 9 && code[4] == '-') { uint32_t rawValue = 0; - for(int i = 0; i < code.size(); i++) { + for(int i = 0; i < (int)code.size(); i++) { if(code[i] != '-') { rawValue <<= 4; size_t pos = _convertTable.find_first_of(code[i]); @@ -98,7 +98,7 @@ void CheatManager::AddStringCheat(string code) AddCheat(cheat); } else if(code.size() == 8) { - for(int i = 0; i < code.size(); i++) { + for(int i = 0; i < (int)code.size(); i++) { if((code[i] < 'A' || code[i] > 'F') && (code[i] < '0' && code[i] > '9')) { //Invalid code return; diff --git a/Core/InputHud.cpp b/Core/InputHud.cpp index 5bf496d..93224c1 100644 --- a/Core/InputHud.cpp +++ b/Core/InputHud.cpp @@ -121,7 +121,7 @@ void InputHud::DrawControllers(OverscanDimensions overscan, int frameNumber) break; } - for(int i = 0; i < controllerData.size(); i++) { + for(int i = 0; i < (int)controllerData.size(); i++) { if(controllerData[i].Type == ControllerType::SnesController) { if(cfg.DisplayInputPort[i]) { DrawController(i, controllerData[i].State, xStart, yStart, frameNumber); diff --git a/Core/RecordedRomTest.h b/Core/RecordedRomTest.h index fc7ecf6..4cbb130 100644 --- a/Core/RecordedRomTest.h +++ b/Core/RecordedRomTest.h @@ -32,7 +32,7 @@ private: private: void Reset(); - __declspec(noinline) void ValidateFrame(); + void ValidateFrame(); void SaveFrame(); void Save(); diff --git a/Core/stdafx.h b/Core/stdafx.h index 680794f..b338943 100644 --- a/Core/stdafx.h +++ b/Core/stdafx.h @@ -21,6 +21,7 @@ #include #include #include +#include #include "../Utilities/UTF8Util.h"