summaryrefslogtreecommitdiff
path: root/scene/resources/tile_set.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/tile_set.cpp')
-rw-r--r--scene/resources/tile_set.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp
index 2ab9d4b5a3..45e981271f 100644
--- a/scene/resources/tile_set.cpp
+++ b/scene/resources/tile_set.cpp
@@ -4357,13 +4357,13 @@ void TileSetPluginAtlasRendering::update_dirty_quadrants(TileMap *p_tile_map, Se
RenderingServer *rs = RenderingServer::get_singleton();
// Free the canvas items.
- for (RID E : q.canvas_items) {
+ for (const RID &E : q.canvas_items) {
rs->free(E);
}
q.canvas_items.clear();
// Free the occluders.
- for (RID E : q.occluders) {
+ for (const RID &E : q.occluders) {
rs->free(E);
}
q.occluders.clear();
@@ -4473,7 +4473,7 @@ void TileSetPluginAtlasRendering::update_dirty_quadrants(TileMap *p_tile_map, Se
// Sort the quadrants
for (Map<Vector2i, Vector2i, TileMapQuadrant::CoordsWorldComparator>::Element *E = world_to_map.front(); E; E = E->next()) {
TileMapQuadrant &q = quadrant_map[E->value()];
- for (RID F : q.canvas_items) {
+ for (const RID &F : q.canvas_items) {
RS::get_singleton()->canvas_item_set_draw_index(F, index++);
}
}
@@ -4491,13 +4491,13 @@ void TileSetPluginAtlasRendering::create_quadrant(TileMap *p_tile_map, TileMapQu
void TileSetPluginAtlasRendering::cleanup_quadrant(TileMap *p_tile_map, TileMapQuadrant *p_quadrant) {
// Free the canvas items.
- for (RID E : p_quadrant->canvas_items) {
+ for (const RID &E : p_quadrant->canvas_items) {
RenderingServer::get_singleton()->free(E);
}
p_quadrant->canvas_items.clear();
// Free the occluders.
- for (RID E : p_quadrant->occluders) {
+ for (const RID &E : p_quadrant->occluders) {
RenderingServer::get_singleton()->free(E);
}
p_quadrant->occluders.clear();