diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-05-21 01:06:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 01:06:21 +0200 |
commit | 8adf04804550957f43c810b13fcce66dd76e5fd8 (patch) | |
tree | 2ee58365f1092587277770ceaedfc1e35454acfd /servers/rendering/renderer_canvas_cull.cpp | |
parent | f4126cc902b0cbb100bcf1b37ee15df5a8430d21 (diff) | |
parent | 45af29da8095af16729955117a165d23e77cd740 (diff) |
Merge pull request #61194 from reduz/new-hash-set
Add a new HashSet template
Diffstat (limited to 'servers/rendering/renderer_canvas_cull.cpp')
-rw-r--r-- | servers/rendering/renderer_canvas_cull.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index 9291a89333..bc1e8eb348 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -1928,14 +1928,14 @@ bool RendererCanvasCull::free(RID p_rid) { ERR_FAIL_COND_V(!canvas, false); while (canvas->viewports.size()) { - RendererViewport::Viewport *vp = RSG::viewport->viewport_owner.get_or_null(canvas->viewports.front()->get()); + RendererViewport::Viewport *vp = RSG::viewport->viewport_owner.get_or_null(*canvas->viewports.begin()); ERR_FAIL_COND_V(!vp, true); HashMap<RID, RendererViewport::Viewport::CanvasData>::Iterator E = vp->canvas_map.find(p_rid); ERR_FAIL_COND_V(!E, true); vp->canvas_map.erase(p_rid); - canvas->viewports.erase(canvas->viewports.front()); + canvas->viewports.erase(*canvas->viewports.begin()); } for (int i = 0; i < canvas->child_items.size(); i++) { @@ -2030,8 +2030,8 @@ bool RendererCanvasCull::free(RID p_rid) { RSG::canvas_render->free(occluder_poly->occluder); while (occluder_poly->owners.size()) { - occluder_poly->owners.front()->get()->polygon = RID(); - occluder_poly->owners.erase(occluder_poly->owners.front()); + (*occluder_poly->owners.begin())->polygon = RID(); + occluder_poly->owners.remove(occluder_poly->owners.begin()); } canvas_light_occluder_polygon_owner.free(p_rid); |