You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Fix some issues found by cppcheck.
This commit is contained in:
@@ -772,6 +772,8 @@ void Input::action_press(const StringName &p_action, float p_strength) {
|
||||
action.process_frame = Engine::get_singleton()->get_process_frames();
|
||||
action.pressed = true;
|
||||
action.strength = p_strength;
|
||||
action.raw_strength = p_strength;
|
||||
action.exact = true;
|
||||
|
||||
action_state[p_action] = action;
|
||||
}
|
||||
@@ -783,6 +785,8 @@ void Input::action_release(const StringName &p_action) {
|
||||
action.process_frame = Engine::get_singleton()->get_process_frames();
|
||||
action.pressed = false;
|
||||
action.strength = 0.f;
|
||||
action.raw_strength = 0.f;
|
||||
action.exact = true;
|
||||
|
||||
action_state[p_action] = action;
|
||||
}
|
||||
@@ -1070,7 +1074,6 @@ void Input::_axis_event(int p_device, JoyAxis p_axis, float p_value) {
|
||||
|
||||
Input::JoyEvent Input::_get_mapped_button_event(const JoyDeviceMapping &mapping, JoyButton p_button) {
|
||||
JoyEvent event;
|
||||
event.type = TYPE_MAX;
|
||||
|
||||
for (int i = 0; i < mapping.bindings.size(); i++) {
|
||||
const JoyBinding binding = mapping.bindings[i];
|
||||
@@ -1106,7 +1109,6 @@ Input::JoyEvent Input::_get_mapped_button_event(const JoyDeviceMapping &mapping,
|
||||
|
||||
Input::JoyEvent Input::_get_mapped_axis_event(const JoyDeviceMapping &mapping, JoyAxis p_axis, float p_value) {
|
||||
JoyEvent event;
|
||||
event.type = TYPE_MAX;
|
||||
|
||||
for (int i = 0; i < mapping.bindings.size(); i++) {
|
||||
const JoyBinding binding = mapping.bindings[i];
|
||||
|
||||
Reference in New Issue
Block a user