diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-11-26 20:21:12 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-11-26 20:21:12 +0000 |
commit | 239b3ab10b460da34c490a7e06a21c984e21ffb6 (patch) | |
tree | 4ce09f5d091ffbcf063a9d0fc076659dfe9e3142 /gfx/manualCameraController.cpp | |
parent | Don't run the app by default (diff) | |
download | ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.tar.bz2 ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.tar.xz ilt-239b3ab10b460da34c490a7e06a21c984e21ffb6.zip |
Enable all Jason Turner recommended warnings
Diffstat (limited to 'gfx/manualCameraController.cpp')
-rw-r--r-- | gfx/manualCameraController.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
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<float>(e.motion.xrel); + pitch = std::clamp(pitch - 0.01F * static_cast<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 - (float)e.wheel.y * 4.F, 5.F, 200.F); + dist = std::clamp(dist - static_cast<float>(e.wheel.y) * 4.F, 5.F, 200.F); break; } return false; |