From f2654cf7d46b0e55d288cc48bdd6af872fb021f4 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sun, 2 May 2021 14:44:31 +0100 Subject: Fix warnings produced by new clang-tidy --- gfx/manualCameraController.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gfx/manualCameraController.cpp') diff --git a/gfx/manualCameraController.cpp b/gfx/manualCameraController.cpp index 21eefc8..268920a 100644 --- a/gfx/manualCameraController.cpp +++ b/gfx/manualCameraController.cpp @@ -43,8 +43,8 @@ ManualCameraController::handleInput(SDL_Event & e) case SDL_MOUSEMOTION: if (mrb) { if (ctrl) { - direction -= 0.01F * e.motion.xrel; - pitch = std::clamp(pitch - 0.01F * e.motion.yrel, 0.1F, half_pi); + direction -= 0.01F * (float)e.motion.xrel; + pitch = std::clamp(pitch - 0.01F * (float)e.motion.yrel, 0.1F, half_pi); } else { focus += rotate_flat(-direction) * glm::vec2 {e.motion.xrel, e.motion.yrel}; @@ -52,7 +52,7 @@ ManualCameraController::handleInput(SDL_Event & e) } return true; case SDL_MOUSEWHEEL: - dist = std::clamp(dist - e.wheel.y * 4.F, 5.F, 200.F); + dist = std::clamp(dist - (float)e.wheel.y * 4.F, 5.F, 200.F); break; } return false; -- cgit v1.2.3