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:
Rémi Verschelde 2018-10-01 18:06:17 +02:00
parent 9258d7b5d0
commit b2bba4be44

View file

@ -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);
}
}