diff --git a/Core/HLE/HLE.cpp b/Core/HLE/HLE.cpp index 7bdf11e4f0..3e68432aa9 100644 --- a/Core/HLE/HLE.cpp +++ b/Core/HLE/HLE.cpp @@ -481,7 +481,7 @@ const HLEFunction *GetSyscallInfo(MIPSOpcode op) ERROR_LOG(HLE, "Unknown syscall: Module: %s", modulenum > (int) moduleDB.size() ? "(unknown)" : moduleDB[modulenum].name); return NULL; } - if (modulenum >= moduleDB.size()) { + if (modulenum >= (int)moduleDB.size()) { ERROR_LOG(HLE, "Syscall had bad module number %i - probably executing garbage", modulenum); return NULL; } diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 719a71e82f..9db228d193 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -271,7 +271,7 @@ void ControlMappingScreen::dialogFinished(const Screen *dialog, DialogResult res } void ControlMappingScreen::KeyMapped(int pspkey) { // Notification to let us refocus the same one after recreating views. - for (int i = 0; i < mappers_.size(); i++) { + for (size_t i = 0; i < mappers_.size(); i++) { if (mappers_[i]->GetPspKey() == pspkey) SetFocusedView(mappers_[i]); } diff --git a/UI/TiltEventProcessor.cpp b/UI/TiltEventProcessor.cpp index 82ccf7a30f..60cae2c9d6 100644 --- a/UI/TiltEventProcessor.cpp +++ b/UI/TiltEventProcessor.cpp @@ -28,7 +28,7 @@ inline Tilt dampTilt(const Tilt &tilt, float deadzone, float xSensitivity, float //multiply sensitivity by 2 so that "overshoot" is possible. I personally prefer a //sensitivity >1 for kingdom hearts and < 1 for Gods Eater. so yes, overshoot is nice //to have. - return Tilt(tiltInputCurve(tilt.x_, deadzone, 2.0 * xSensitivity), tiltInputCurve(tilt.y_, deadzone, 2.0 * ySensitivity)); + return Tilt(tiltInputCurve(tilt.x_, deadzone, 2.0f * xSensitivity), tiltInputCurve(tilt.y_, deadzone, 2.0f * ySensitivity)); } inline float clamp(float f) { @@ -44,7 +44,7 @@ Tilt TiltEventProcessor::NormalizeTilt(const Tilt &tilt){ // Values are in metres per second. Divide by 9.8 to get 'g' value float maxX = 9.8f, maxY = 9.8f; #else - float maxX = 1.0, maxY = 1.0; + float maxX = 1.0f, maxY = 1.0f; #endif return Tilt(tilt.x_ / maxX, tilt.y_ / maxY); @@ -58,11 +58,11 @@ Tilt TiltEventProcessor::GenTilt(const Tilt &baseTilt, const Tilt ¤tTilt, //invert x and y axes if needed if (invertX) { - transformedTilt.x_ *= -1.0; + transformedTilt.x_ *= -1.0f; } if (invertY) { - transformedTilt.y_ *= -1.0; + transformedTilt.y_ *= -1.0f; } //next, normalize the tilt values @@ -98,7 +98,7 @@ void TiltEventProcessor::GenerateDPadEvent(const Tilt &tilt) { } int ctrlMask = 0; - int direction = (int)(floorf((atan2f(tilt.y_, tilt.x_) / (2 * M_PI) * 8) + 0.5f)) & 7; + int direction = (int)(floorf((atan2f(tilt.y_, tilt.x_) / (2.0f * (float)M_PI) * 8.0f) + 0.5f)) & 7; switch (direction) { case 0: ctrlMask |= CTRL_RIGHT; break; case 1: ctrlMask |= CTRL_RIGHT | CTRL_DOWN; break; @@ -135,7 +135,7 @@ void TiltEventProcessor::GenerateActionButtonEvent(const Tilt &tilt) { return; } - int direction = (int)(floorf((atan2f(tilt.y_, tilt.x_) / (2 * M_PI) * 4) + 0.5f)) & 3; + int direction = (int)(floorf((atan2f(tilt.y_, tilt.x_) / (2.0f * (float)M_PI) * 4.0f) + 0.5f)) & 3; __CtrlButtonDown(buttons[direction]); }; diff --git a/Windows/DinputDevice.cpp b/Windows/DinputDevice.cpp index 774820a656..3050518dd2 100644 --- a/Windows/DinputDevice.cpp +++ b/Windows/DinputDevice.cpp @@ -149,7 +149,7 @@ DinputDevice::DinputDevice(int devnum) { } getDevices(); - if ( (devnum >= devices.size()) || FAILED(getPDI()->CreateDevice(devices.at(devnum).guidInstance, &pJoystick, NULL))) + if ( (devnum >= (int)devices.size()) || FAILED(getPDI()->CreateDevice(devices.at(devnum).guidInstance, &pJoystick, NULL))) { return; } diff --git a/Windows/GEDebugger/VertexPreview.cpp b/Windows/GEDebugger/VertexPreview.cpp index bfd07c9746..9c1085f0bb 100644 --- a/Windows/GEDebugger/VertexPreview.cpp +++ b/Windows/GEDebugger/VertexPreview.cpp @@ -189,7 +189,7 @@ void CGEDebugger::UpdatePrimPreview(u32 op) { }; Matrix4x4 ortho; - ortho.setOrtho(-(int)gstate_c.cutRTOffsetX, (frameWindow->TexWidth() - (int)gstate_c.cutRTOffsetX) * scale[0], frameWindow->TexHeight() * scale[1], 0, -1, 1); + ortho.setOrtho(-(float)gstate_c.cutRTOffsetX, (frameWindow->TexWidth() - (int)gstate_c.cutRTOffsetX) * scale[0], frameWindow->TexHeight() * scale[1], 0, -1, 1); glUniformMatrix4fv(previewProgram->u_viewproj, 1, GL_FALSE, ortho.getReadPtr()); glEnableVertexAttribArray(previewProgram->a_position); glVertexAttribPointer(previewProgram->a_position, 3, GL_FLOAT, GL_FALSE, sizeof(GPUDebugVertex), (float *)vertices.data() + 2);