diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-18 11:27:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-18 11:27:04 +0100 |
commit | ef5891091bceef2800b4fae4cd85af219e791467 (patch) | |
tree | 8d58cca8cae2c34d408450cfb5ceb198543147b7 /servers/visual/visual_server_canvas.cpp | |
parent | c7faf2e16b684f3dd0246dbdb662b1826dd24571 (diff) | |
parent | 3205a92ad872f918c8322cdcd1434c231a1fd251 (diff) |
Merge pull request #36311 from reduz/poolvector-deprecation
Convert all references and instances of PoolVector to Vector
Diffstat (limited to 'servers/visual/visual_server_canvas.cpp')
-rw-r--r-- | servers/visual/visual_server_canvas.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index 69f843eb4b..c1833fea44 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -1265,20 +1265,20 @@ RID VisualServerCanvas::canvas_occluder_polygon_create() { occluder_poly->occluder = VSG::canvas_render->occluder_polygon_create(); return canvas_light_occluder_polygon_owner.make_rid(occluder_poly); } -void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape, bool p_closed) { +void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygon, const Vector<Vector2> &p_shape, bool p_closed) { if (p_shape.size() < 3) { canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, p_shape); return; } - PoolVector<Vector2> lines; + Vector<Vector2> lines; int lc = p_shape.size() * 2; lines.resize(lc - (p_closed ? 0 : 2)); { - PoolVector<Vector2>::Write w = lines.write(); - PoolVector<Vector2>::Read r = p_shape.read(); + Vector2 *w = lines.ptrw(); + const Vector2 *r = p_shape.ptr(); int max = lc / 2; if (!p_closed) { @@ -1295,7 +1295,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape(RID p_occluder_polygo canvas_occluder_polygon_set_shape_as_lines(p_occluder_polygon, lines); } -void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const PoolVector<Vector2> &p_shape) { +void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occluder_polygon, const Vector<Vector2> &p_shape) { LightOccluderPolygon *occluder_poly = canvas_light_occluder_polygon_owner.getornull(p_occluder_polygon); ERR_FAIL_COND(!occluder_poly); @@ -1304,7 +1304,7 @@ void VisualServerCanvas::canvas_occluder_polygon_set_shape_as_lines(RID p_occlud int lc = p_shape.size(); occluder_poly->aabb = Rect2(); { - PoolVector<Vector2>::Read r = p_shape.read(); + const Vector2 *r = p_shape.ptr(); for (int i = 0; i < lc; i++) { if (i == 0) occluder_poly->aabb.position = r[i]; |