diff options
Diffstat (limited to 'scene/resources/tile_set.cpp')
-rw-r--r-- | scene/resources/tile_set.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/tile_set.cpp b/scene/resources/tile_set.cpp index 2ab9d4b5a3..737b47ed95 100644 --- a/scene/resources/tile_set.cpp +++ b/scene/resources/tile_set.cpp @@ -2728,7 +2728,7 @@ TileSet::TileSet() { tile_lines_mesh.instantiate(); tile_filled_mesh.instantiate(); - // Instanciate and list all plugins. + // Instantiate and list all plugins. tile_set_plugins_vector.append(memnew(TileSetPluginAtlasRendering)); tile_set_plugins_vector.append(memnew(TileSetPluginAtlasPhysics)); tile_set_plugins_vector.append(memnew(TileSetPluginAtlasNavigation)); @@ -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(); |