diff options
| author | Aaron Franke <arnfranke@yahoo.com> | 2021-09-07 23:25:35 -0500 |
|---|---|---|
| committer | Aaron Franke <arnfranke@yahoo.com> | 2021-10-12 00:17:27 -0500 |
| commit | 7e51e4cb84aeb3c191289752e0e6b92facd8f7f6 (patch) | |
| tree | e07661aeb47a95dbbce602440099da860e2d0c06 /main | |
| parent | f9aec342dcd51d65c5970dd395e3c7a66cac446c (diff) | |
| download | redot-engine-7e51e4cb84aeb3c191289752e0e6b92facd8f7f6.tar.gz | |
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; |
