Fix warnings about invalid logical not on left hand side [-Wlogical-not-parentheses]
Fixes the following Clang 7 warnings and bugs: ``` editor/plugins/curve_editor_plugin.cpp:208:69: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] editor/plugins/curve_editor_plugin.cpp:214:43: warning: logical not is only applied to the left hand side of this comparison [-Wlogical-not-parentheses] ``` Changed according to @Zylann's suggestion on https://github.com/godotengine/godot/pull/22593#discussion_r221699573
This commit is contained in:
parent
9258d7b5d0
commit
b2bba4be44
1 changed files with 2 additions and 2 deletions
|
@ -205,13 +205,13 @@ void CurveEditor::on_gui_input(const Ref<InputEvent> &p_event) {
|
|||
curve.set_point_left_tangent(_selected_point, tangent);
|
||||
|
||||
// Note: if a tangent is set to linear, it shouldn't be linked to the other
|
||||
if (link && _selected_point != curve.get_point_count() - 1 && !curve.get_point_right_mode(_selected_point) != Curve::TANGENT_FREE)
|
||||
if (link && _selected_point != (curve.get_point_count() - 1) && curve.get_point_right_mode(_selected_point) != Curve::TANGENT_LINEAR)
|
||||
curve.set_point_right_tangent(_selected_point, tangent);
|
||||
|
||||
} else {
|
||||
curve.set_point_right_tangent(_selected_point, tangent);
|
||||
|
||||
if (link && _selected_point != 0 && !curve.get_point_left_mode(_selected_point) != Curve::TANGENT_FREE)
|
||||
if (link && _selected_point != 0 && curve.get_point_left_mode(_selected_point) != Curve::TANGENT_LINEAR)
|
||||
curve.set_point_left_tangent(_selected_point, tangent);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue