summaryrefslogtreecommitdiff
path: root/editor/plugins/canvas_item_editor_plugin.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-06-26 15:08:25 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-06-26 15:08:25 +0200
commit4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch)
tree894c5070a709198ed994db7c7d0c0e124abbc9e5 /editor/plugins/canvas_item_editor_plugin.cpp
parent5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff)
Some code changed with Clang-Tidy
Diffstat (limited to 'editor/plugins/canvas_item_editor_plugin.cpp')
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 3c24fd19b6..10f53182bf 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -71,8 +71,7 @@ class SnapDialog : public ConfirmationDialog {
SpinBox *rotation_step;
public:
- SnapDialog() :
- ConfirmationDialog() {
+ SnapDialog() {
const int SPIN_BOX_GRID_RANGE = 256;
const int SPIN_BOX_ROTATION_RANGE = 360;
Label *label;
@@ -490,8 +489,6 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
r_items.push_back(res);
}
}
-
- return;
}
void CanvasItemEditor::_get_canvas_items_at_pos(const Point2 &p_pos, Vector<_SelectResult> &r_items) {
@@ -1999,11 +1996,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
return true;
}
- if (k.is_valid() && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)) {
- // Accept the key event in any case
- return true;
- }
- return false;
+ return (k.is_valid() && (k->get_scancode() == KEY_UP || k->get_scancode() == KEY_DOWN || k->get_scancode() == KEY_LEFT || k->get_scancode() == KEY_RIGHT)); // Accept the key event in any case
}
bool CanvasItemEditor::_gui_input_select(const Ref<InputEvent> &p_event) {
@@ -4340,7 +4333,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
if (!n2d->get_parent_item())
continue;
- if (n2d->has_meta("_edit_bone_") && (bool)n2d->get_meta("_edit_bone_") == true)
+ if (n2d->has_meta("_edit_bone_") && n2d->get_meta("_edit_bone_"))
continue;
undo_redo->add_do_method(n2d, "set_meta", "_edit_bone_", true);
@@ -4390,7 +4383,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
continue;
- if (canvas_item->has_meta("_edit_ik_") && (bool)canvas_item->get_meta("_edit_ik_") == true)
+ if (canvas_item->has_meta("_edit_ik_") && canvas_item->get_meta("_edit_ik_"))
continue;
undo_redo->add_do_method(canvas_item, "set_meta", "_edit_ik_", true);