From 239b3ab10b460da34c490a7e06a21c984e21ffb6 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 26 Nov 2021 20:21:12 +0000 Subject: Enable all Jason Turner recommended warnings --- 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 022fb72..cacf6ac 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 * (float)e.motion.xrel; - pitch = std::clamp(pitch - 0.01F * (float)e.motion.yrel, 0.1F, half_pi); + direction -= 0.01F * static_cast(e.motion.xrel); + pitch = std::clamp(pitch - 0.01F * static_cast(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 - (float)e.wheel.y * 4.F, 5.F, 200.F); + dist = std::clamp(dist - static_cast(e.wheel.y) * 4.F, 5.F, 200.F); break; } return false; -- cgit v1.2.3