summaryrefslogtreecommitdiff
path: root/gfx/manualCameraController.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-05-02 14:44:31 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2021-05-02 14:44:31 +0100
commitf2654cf7d46b0e55d288cc48bdd6af872fb021f4 (patch)
treeb3bc31345a2ea16fd6b76b0435247027fab48808 /gfx/manualCameraController.cpp
parentBump to release GCC version (diff)
downloadilt-f2654cf7d46b0e55d288cc48bdd6af872fb021f4.tar.bz2
ilt-f2654cf7d46b0e55d288cc48bdd6af872fb021f4.tar.xz
ilt-f2654cf7d46b0e55d288cc48bdd6af872fb021f4.zip
Fix warnings produced by new clang-tidy
Diffstat (limited to 'gfx/manualCameraController.cpp')
-rw-r--r--gfx/manualCameraController.cpp6
1 files changed, 3 insertions, 3 deletions
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;