summaryrefslogtreecommitdiff
path: root/scene/main/viewport.cpp
diff options
context:
space:
mode:
authorMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-10-24 15:59:18 +0200
committerMarkus Sauermann <6299227+Sauermann@users.noreply.github.com>2022-10-24 15:59:18 +0200
commit5ee449efec44a1a1ecbcc7eebdb5d768e1decdcf (patch)
tree154dfe0b024b1050175c4bb9bab6f109f1fef17a /scene/main/viewport.cpp
parent040f49ed6e71a6e7f23d763c4b56095cbf319ef7 (diff)
Remove unnecessary casts
button_add_item and button_add are both Button p_parent is a Node3D CanvasItem can never be cast to Viewport
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r--scene/main/viewport.cpp4
1 files changed, 0 insertions, 4 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index a2963eadd5..1de3caaa97 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1403,10 +1403,6 @@ Control *Viewport::gui_find_control(const Point2 &p_global) {
}
Control *Viewport::_gui_find_control_at_pos(CanvasItem *p_node, const Point2 &p_global, const Transform2D &p_xform, Transform2D &r_inv_xform) {
- if (Object::cast_to<Viewport>(p_node)) {
- return nullptr;
- }
-
if (!p_node->is_visible()) {
return nullptr; // Canvas item hidden, discard.
}