summaryrefslogtreecommitdiff
path: root/scene/main/canvas_item.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/main/canvas_item.cpp')
-rw-r--r--scene/main/canvas_item.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/scene/main/canvas_item.cpp b/scene/main/canvas_item.cpp
index 5a12480577..0a76351885 100644
--- a/scene/main/canvas_item.cpp
+++ b/scene/main/canvas_item.cpp
@@ -956,8 +956,7 @@ void CanvasItem::_notify_transform(CanvasItem *p_node) {
}
}
- for (List<CanvasItem *>::Element *E = p_node->children_items.front(); E; E = E->next()) {
- CanvasItem *ci = E->get();
+ for (CanvasItem *ci : p_node->children_items) {
if (ci->top_level) {
continue;
}
@@ -1334,9 +1333,9 @@ void CanvasItem::_update_texture_filter_changed(bool p_propagate) {
update();
if (p_propagate) {
- for (List<CanvasItem *>::Element *E = children_items.front(); E; E = E->next()) {
- if (!E->get()->top_level && E->get()->texture_filter == TEXTURE_FILTER_PARENT_NODE) {
- E->get()->_update_texture_filter_changed(true);
+ for (CanvasItem *E : children_items) {
+ if (!E->top_level && E->texture_filter == TEXTURE_FILTER_PARENT_NODE) {
+ E->_update_texture_filter_changed(true);
}
}
}
@@ -1374,9 +1373,9 @@ void CanvasItem::_update_texture_repeat_changed(bool p_propagate) {
RS::get_singleton()->canvas_item_set_default_texture_repeat(get_canvas_item(), texture_repeat_cache);
update();
if (p_propagate) {
- for (List<CanvasItem *>::Element *E = children_items.front(); E; E = E->next()) {
- if (!E->get()->top_level && E->get()->texture_repeat == TEXTURE_REPEAT_PARENT_NODE) {
- E->get()->_update_texture_repeat_changed(true);
+ for (CanvasItem *E : children_items) {
+ if (!E->top_level && E->texture_repeat == TEXTURE_REPEAT_PARENT_NODE) {
+ E->_update_texture_repeat_changed(true);
}
}
}