Initialize uninitMemberVar with default value

For preventing undefined behaviour caused by uninitialized member
variables, initialize some uninitMemberVar with its default value

Fixes #52674 in some part, `mainly` for main directory

Signed-off-by: snowapril <sinjihng@gmail.com>
This commit is contained in:
snowapril 2021-10-11 11:47:07 +09:00
parent de319bec4f
commit 9203b22e22
2 changed files with 5 additions and 0 deletions

View file

@ -593,7 +593,9 @@ void InputDefault::action_press(const StringName &p_action, float p_strength) {
action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = true;
action.exact = false;
action.strength = p_strength;
action.raw_strength = 0.f;
action_state[p_action] = action;
}
@ -604,7 +606,9 @@ void InputDefault::action_release(const StringName &p_action) {
action.physics_frame = Engine::get_singleton()->get_physics_frames();
action.idle_frame = Engine::get_singleton()->get_idle_frames();
action.pressed = false;
action.exact = false;
action.strength = 0.f;
action.raw_strength = 0.f;
action_state[p_action] = action;
}

View file

@ -324,6 +324,7 @@ MainFrameTime MainTimerSync::advance_core(float p_frame_slice, int p_iterations_
MainFrameTime ret;
ret.idle_step = p_idle_step;
ret.interpolation_fraction = 0.0f;
// simple determination of number of physics iteration
time_accum += ret.idle_step;