summaryrefslogtreecommitdiffstats
path: root/editor/plugins/sprite_2d_editor_plugin.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-01-29 13:18:09 +0100
committerRémi Verschelde <rverschelde@gmail.com>2024-01-29 13:18:09 +0100
commitfa48a51183567934984b381ad8ec281cb24d66ba (patch)
treef4737d9d29666e6e531a0fd163c49420383484f5 /editor/plugins/sprite_2d_editor_plugin.cpp
parente59e58a68afd60d0fa63e61751bd6d30575f3bb3 (diff)
parent15369fdb1d692e1515dd888dfbae275074be63be (diff)
downloadredot-engine-fa48a51183567934984b381ad8ec281cb24d66ba.tar.gz
Merge pull request #87688 from AThousandShips/what_is_this
Remove unnecessary `this->` expressions
Diffstat (limited to 'editor/plugins/sprite_2d_editor_plugin.cpp')
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index c1e7070451..3e98f3d64f 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -416,7 +416,7 @@ void Sprite2DEditor::_create_collision_polygon_2d_node() {
ur->create_action(TTR("Create CollisionPolygon2D Sibling"));
ur->add_do_method(this, "_add_as_sibling_or_child", node, collision_polygon_2d_instance);
ur->add_do_reference(collision_polygon_2d_instance);
- ur->add_undo_method(node != this->get_tree()->get_edited_scene_root() ? node->get_parent() : this->get_tree()->get_edited_scene_root(), "remove_child", collision_polygon_2d_instance);
+ ur->add_undo_method(node != get_tree()->get_edited_scene_root() ? node->get_parent() : get_tree()->get_edited_scene_root(), "remove_child", collision_polygon_2d_instance);
ur->commit_action();
}
}
@@ -449,21 +449,21 @@ void Sprite2DEditor::_create_light_occluder_2d_node() {
ur->create_action(TTR("Create LightOccluder2D Sibling"));
ur->add_do_method(this, "_add_as_sibling_or_child", node, light_occluder_2d_instance);
ur->add_do_reference(light_occluder_2d_instance);
- ur->add_undo_method(node != this->get_tree()->get_edited_scene_root() ? node->get_parent() : this->get_tree()->get_edited_scene_root(), "remove_child", light_occluder_2d_instance);
+ ur->add_undo_method(node != get_tree()->get_edited_scene_root() ? node->get_parent() : get_tree()->get_edited_scene_root(), "remove_child", light_occluder_2d_instance);
ur->commit_action();
}
}
void Sprite2DEditor::_add_as_sibling_or_child(Node *p_own_node, Node *p_new_node) {
// Can't make sibling if own node is scene root
- if (p_own_node != this->get_tree()->get_edited_scene_root()) {
+ if (p_own_node != get_tree()->get_edited_scene_root()) {
p_own_node->get_parent()->add_child(p_new_node, true);
Object::cast_to<Node2D>(p_new_node)->set_transform(Object::cast_to<Node2D>(p_own_node)->get_transform());
} else {
p_own_node->add_child(p_new_node, true);
}
- p_new_node->set_owner(this->get_tree()->get_edited_scene_root());
+ p_new_node->set_owner(get_tree()->get_edited_scene_root());
}
void Sprite2DEditor::_debug_uv_input(const Ref<InputEvent> &p_input) {