diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-10-12 08:38:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 08:38:46 +0200 |
commit | 0fd50ff21777e74258ba5a38e9c32b27cf0784b2 (patch) | |
tree | f8796d2d0081664e729762194ea194d64f8ce79c /main | |
parent | 34624068583e472cc69c6864be360821265e764b (diff) | |
parent | 7e51e4cb84aeb3c191289752e0e6b92facd8f7f6 (diff) |
Merge pull request #52736 from aaronfranke/lgtm-mult
Fix some LGTM errors of "Multiplication result converted to larger type"
Diffstat (limited to 'main')
-rw-r--r-- | main/main.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/main/main.cpp b/main/main.cpp index 5a2a088494..3cc7923cc2 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -2488,17 +2488,17 @@ bool Main::iteration() { iterating++; - uint64_t ticks = OS::get_singleton()->get_ticks_usec(); + const uint64_t ticks = OS::get_singleton()->get_ticks_usec(); Engine::get_singleton()->_frame_ticks = ticks; main_timer_sync.set_cpu_ticks_usec(ticks); main_timer_sync.set_fixed_fps(fixed_fps); - uint64_t ticks_elapsed = ticks - last_ticks; + const uint64_t ticks_elapsed = ticks - last_ticks; - int physics_ticks_per_second = Engine::get_singleton()->get_physics_ticks_per_second(); - float physics_step = 1.0 / physics_ticks_per_second; + const int physics_ticks_per_second = Engine::get_singleton()->get_physics_ticks_per_second(); + const double physics_step = 1.0 / physics_ticks_per_second; - float time_scale = Engine::get_singleton()->get_time_scale(); + const double time_scale = Engine::get_singleton()->get_time_scale(); MainFrameTime advance = main_timer_sync.advance(physics_step, physics_ticks_per_second); double process_step = advance.process_step; |